Re: [Maya-Python] maya API ?? reading an external json file

2021-05-23 Thread Todd Widup
Thanks marcus, will give that a try On Sun, May 23, 2021 at 2:11 AM Marcus Ottosson wrote: > It would only be computed outputMatrix is pulled, so a first step is > testing that. > > cmds.setAttr(yourNode + ".PoseFile", "changed.txt", type="string")# Compute > not called yet.. > cmds.getAttr(you

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-23 Thread Marcus Ottosson
It would only be computed outputMatrix is pulled, so a first step is testing that. cmds.setAttr(yourNode + ".PoseFile", "changed.txt", type="string")# Compute not called yet.. cmds.getAttr(yourNode + ".outputMatrix")# Compute called If that doesn’t happen, it’s possible strings aren’t part of nor

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-22 Thread Todd Widup
hey quick follow up on this...finally got a bit of time to start on this more...but getting an odd issue...or it could be a normal thing. code for adding : poseFilePath = tAttr.create("PoseFile", "psf", MFnData::kString); tAttr.setUsedAsFilename(true); tAttr.setStorable(true); tAttr.setKeyable(f

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Justin Israel
On Wed, May 19, 2021 at 7:21 AM Marcus Ottosson wrote: > pybind11 is great, but it is incrdibly slow to compile. Like 20 > seconds for a handful of bound methods. It’s insane. > > That aside, I’ve got a recent project that might make a good example of > what it is and how it can be used to re

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Marcus Ottosson
pybind11 is great, but it is incrdibly slow to compile. Like 20 seconds for a handful of bound methods. It’s insane. That aside, I’ve got a recent project that might make a good example of what it is and how it can be used to re-create the Maya Python API. - https://github.com/mottosso/cmd

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Alok Gandhi
Thanks Justin! pybind definitely seems interesting. And yes, Cython is definitely great. I have used it in production previously for some generic algorithms implementations where performance was needed in python centric api interface. And it is super easy to write too. On Tue, May 18, 2021, 23:58

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Justin Israel
On Wed, May 19, 2021 at 6:10 AM Alok Gandhi wrote: > As a side note, for generic use (outside of maya) you can use boost python > to call python from C++ and vice versa: > > https://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/tutorial/index.html > Boost is a super heavy dependency. These

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Alok Gandhi
As a side note, for generic use (outside of maya) you can use boost python to call python from C++ and vice versa: https://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/tutorial/index.html On Tue, May 18, 2021, 23:30 Todd Widup wrote: > Thanks Marcus, > the txt file will be just a bunch

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Todd Widup
Thanks Marcus, the txt file will be just a bunch of values and matrices ... it might be binary it might be ascii..not 100% yet, depends how big the files get. was leaning towards JSon for easy of use/setup the python Q was purely curiosity On Tue, May 18, 2021 at 9:50 AM Marcus Ottosson wrote

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Marcus Ottosson
what would I use to allow the plugin to read an external user specified file, either a txt or json? You could make a string attribute on the node, and set MFnAttribute::isUsedAsFilename = true

[Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Todd Widup
me writing maya plugins has been limited to mostly utility nodes and an occasionally deformer. I am working on something a bit bigger and what would I use to allow the plugin to read an external user specified file, either a txt or json? also, been wondering, is there a way to have a C++ plugin r

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-04 Thread João Victor
Hey Vince, Jakob and Davi! Thank you very much for your help, I received this suggestion below from an artist called tfox, I hope it is useful for you, I believe it is similar what you suggested me. It tooks only 0.047 seconds for 100K polygons. *def buildFaceVertList(fnMesh):* *cursor, out

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-04 Thread João Victor
Hey Davi, thanks a lot for replying! I will take a look at the examples you sent me, so I get back to this thread to say if worked! :) I also think from now it is the best way to go. thanksss a lot! note: as my buddy Marcus suggested me an amazing idea, I am saying I also posted this question

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-04 Thread David Alvarez
Hi Joao, I don't know if is this the kind of info you are looking for https://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__files_Polygon_API_The_five_basic_polygonal_API_classes_htm Iterators I suppose is the way to go if you have to collect info from the whole mesh. The link I provide is c++ but

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread João Victor Ferreira
Hi Jakob! Thank u very much for these informations! I will take a look at your source code! Thanks a lot! :) Joao Enviado do meu iPhone > Em 3 de abr. de 2021, à(s) 22:25, Jakob Kousholt escreveu: > >  > You could look into MSelectionList and MItSelectionList from the Open Maya > module. >

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread Jakob Kousholt
You could look into MSelectionList and MItSelectionList from the Open Maya module. It lets you iterate over things quite fast. It is how Niels Peter and I traverse Geometry looking for issues in our model validation tool. It's probably not the fastest approach, but it is fairly straightforward to

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread João Victor
thanks a lot vince! do u have any suggestion about how I can build this incidence matrix? sorry, I have no idea. thanks! Em sábado, 3 de abril de 2021 às 21:06:16 UTC-3, vince touache escreveu: > if you're looking at querying many vertices per mesh, you might wanna > building and caching an in

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread vince touache
if you're looking at querying many vertices per mesh, you might wanna building and caching an incidence matrix, instead of doing what you're doing now, that should save you a fair bit of redundancy Le samedi 3 avril 2021 à 18:47:40 UTC-4, joaovi...@gmail.com a écrit : > Hey Marcus! Thanks a lot

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread João Victor
Hey Marcus! Thanks a lot for the suggestion! As I understood in your code, you are getting the same vtx[10], right? I was looking for something like this: *#supposing this mesh has 100.000 vertices* *for vtx in list_of_all_vertices_of_the_mesh: * *vtxToEdges = cmds.polyListComponentConversio

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread Marcus Ottosson
Ok, I’m missing a lot of information haha. Let me try and fill in some gaps. Here’s finding edges for 1 vertex amongst 100,000 vertices. plane, _ = cmds.polyPlane(sx=1000, sy=100) cmds.scale(10, 1, 10) def measureMe(): vtx = plane + ".vtx[10]" cmds.polyListComponentConversion(vtx, fromVer

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread João Victor
Marcus, explanning better my previous email: For example, if I want to get the edges around this vertex, I would do this: vtxToEdges = cmds.polyListComponentConversion(vtx, fromVertex=True, toEdge=True) But it is taking too long in thousand loops. :/ Em sábado, 3 de abril de 2021 às 16:58:01 UT

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-03 Thread João Victor
Hey Marcus, thanks for replying. I have to loop it in thousands of times. converting with "polyListComponentConversion" takes too long. There is some way to get it, without having to convert? Or this is the only way? Im using API. thanks! Em sexta-feira, 2 de abril de 2021 às 13:29:12 UTC-3, Marc

Re: [Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-02 Thread Marcus Ottosson
Faster than what? What have you tried and what was the performance of it? On Fri, 2 Apr 2021 at 17:24, João Victor wrote: > Hey guys! > Could somebody help me? > > What is the faster way to get vertices of a face? > > Simply converting the selecion? Or there is a smarter solution? > > Thanks! >

[Maya-Python] Maya API 2.0 get vertices/faces faster?

2021-04-02 Thread João Victor
Hey guys! Could somebody help me? What is the faster way to get vertices of a face? Simply converting the selecion? Or there is a smarter solution? Thanks! -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe

Re: [Maya-Python] Maya API

2020-02-20 Thread Marcus Ottosson
Phew, shot in the dark. :) Happy to help! On Thu, 20 Feb 2020 at 20:22, Todd Widup wrote: > youre on target with the first one Marcus, thanks > > On Thu, Feb 20, 2020 at 11:11 AM Marcus Ottosson > wrote: > >> There’s not enough information in the question. xD >> >> Assuming you mean getting a u

Re: [Maya-Python] Maya API

2020-02-20 Thread Todd Widup
youre on target with the first one Marcus, thanks On Thu, Feb 20, 2020 at 11:11 AM Marcus Ottosson wrote: > There’s not enough information in the question. xD > > Assuming you mean getting a unit conversion when you connect e.g. > polyCube.rotateX to your custom attribute, and that you’re wonder

Re: [Maya-Python] Maya API

2020-02-20 Thread Marcus Ottosson
There’s not enough information in the question. xD Assuming you mean getting a unit conversion when you connect e.g. polyCube.rotateX to your custom attribute, and that you’re wondering what function set you need to use to create such an attribute without Maya automatically creating such a convers

Re: [Maya-Python] Maya API

2020-02-20 Thread Jesse Kielman
Im pretty sure it's MAngle On Thu, 20 Feb 2020, 19:55 Todd Widup, wrote: > hey..what attribute numericData type do you need to you dont get a unit > conversion node for rotations? > > > > -- > Todd Widup > Creature TD / Technical Artist > todd.wi...@gmail.com > > -- > You received this message b

[Maya-Python] Maya API

2020-02-20 Thread Todd Widup
hey..what attribute numericData type do you need to you dont get a unit conversion node for rotations? -- Todd Widup Creature TD / Technical Artist todd.wi...@gmail.com -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.

[Maya-Python] maya api : while importing prompts error

2019-11-19 Thread blossom ghuntla
Hello All, I autodidact basic python, basic maya.cmds, basic qt just for the sake of learning to create a deformer and i am not doing good at all i referred https://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__cpp_ref_y_twist_node_2y_twist_node_8cpp_example_html # defTwist.py import sys im

[Maya-Python] Maya API: rotate around certain point without affecting rotate pivot

2018-08-26 Thread igo rov
I've been searching for hours, but didn't find anything: I want to rotate my object around some point on the surface (vertex). But instead of setting the rotate pivot to this point, I want to calculate the transformation of my object, as if it would have a parent-child relationship, so basically

Re: [Maya-Python] Maya API, getting UV border vertices struggle

2017-11-09 Thread damon shelton
Would just retrieving the number of uvs in a given uvset give you the count you are looking for? I created a sphere, then started creating uv shells out of part of the mesh. len(cmds.ls('pSphere1.map[*]', fl=True)) On Thu, Nov 9, 2017 at 8:03 AM, Benjam901 wrote: > Hello all, > > So here is my

[Maya-Python] Maya API, getting UV border vertices struggle

2017-11-09 Thread Benjam901
Hello all, So here is my struggle at the moment. I am trying to guesstimate the "actual" in-engine vert count for a given object in Maya so we can validate the LOD steps per object before we export. *Proposed solution:* The way I am trying to do this is by checking that a vertex is on a UV bor

[Maya-Python] Maya API: get an objectSet used for filtering objects on camera

2017-07-11 Thread Serge Scherbakov
Hello everybody, When you press *Show->Isolate Selected->View Selected* Maya creates a set " *modelPanelXViewSelectedSet*" and use it for filtering objects in a corresponding viewport. I can get a list of objects using *M3dView::filteredObjectList()* but can't find a good way how to add an objec

[Maya-Python] [Maya API] get the translation matrix from the previous frame

2017-04-30 Thread David DeJuan
Hi, I'm trying to do a Node, where the input is a mesh and get the translation matrix of it in the previous frame. But I don't get it. I have tried using the MPlug getValue setting the MDGContext one frame before, but it doesn't work. This is the code, it is in C++ MStatus node::compute(const M

[Maya-Python] maya api storing selected verts in mFloatPointArray and setting points

2017-01-28 Thread alessia . beccia
Hello, i had a similar problem i posted before where i needed to get all the points of a particular mesh and 'set' the position for another mesh. in that problem i used getPoints, like this: def getPoints(geo): sel = om.MSelectionList() dag = om.MDagPath(

[Maya-Python] Maya API Questions about rendering.

2016-11-18 Thread I73
I am in the process of converting a lot of our tools over to C++ and I am having some trouble with rendering a scene: M3dView view = M3dView::active3dView(); MImage fileImage; view.readColorBuffer(fileImage, true); fileImage.writeToFile("D:/test.jpg", "jpg"); cerr << "Rendered" << endl; This re

[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 G

Re: [Maya-Python] maya api question

2016-07-27 Thread Justin Israel
On Thu, Jul 28, 2016 at 7:20 AM likage wrote: > Yes exactly. That was the missing bit. You weren't showing the part that >> you just described. >> > > >> When you call asMPoint(), you will be creating an instance of MPoint from >> your instance variables x, y, and z and returning it. It should be

Re: [Maya-Python] maya api question

2016-07-27 Thread likage
> > Yes exactly. That was the missing bit. You weren't showing the part that > you just described. > > When you call asMPoint(), you will be creating an instance of MPoint from > your instance variables x, y, and z and returning it. It should be pretty > obviously what is being called, when

Re: [Maya-Python] maya api question

2016-07-26 Thread Alok Gandhi
You are returning a cross product when smooth is false. A cross product is a vector. Also as I said before, your example does not show implementation of getCrossProduct() so it is not clear what actually you are returning. But again, as I mentioned earlier, if your method name is getCrossProduct()

Re: [Maya-Python] maya api question

2016-07-26 Thread Justin Israel
On Wed, Jul 27, 2016 at 10:39 AM likage wrote: > I do not have any code to show. This is something that I have copied and > paste somewhere.. > > But if say I manage to have some values and I set a variable as 'test. > asMPoint()', am I correct to say that it will try to read in 3 values and > it

Re: [Maya-Python] maya api question

2016-07-26 Thread likage
I do not have any code to show. This is something that I have copied and paste somewhere.. But if say I manage to have some values and I set a variable as 'test. asMPoint()', am I correct to say that it will try to read in 3 values and it will be using the class Point, asMPoint function? And he

Re: [Maya-Python] maya api question

2016-07-26 Thread Justin Israel
On Wed, 27 Jul 2016, 4:51 AM likage wrote: > Why do you thing it would be returning a list vs a dict vs other? And I >> don't mean these questions in a condescending way. I think it would be good >> to hear your thought process on how you view the way a class works. Then we >> can address the spe

Re: [Maya-Python] maya api question

2016-07-26 Thread likage
> > I would comment on the second part of your question : > Regarding the getNormal() method, the short answer is yes. To write clean > readable code, the only thing that is of importance (more so in python) is > to name your methods, variable with utmost care. Since getNormal() would > return

Re: [Maya-Python] maya api question

2016-07-26 Thread likage
> > Why do you thing it would be returning a list vs a dict vs other? And I > don't mean these questions in a condescending way. I think it would be good > to hear your thought process on how you view the way a class works. Then we > can address the specifics. What do you expect to get back whe

Re: [Maya-Python] maya api question

2016-07-26 Thread Alok Gandhi
I would comment on the second part of your question : Regarding the getNormal() method, the short answer is yes. To write clean readable code, the only thing that is of importance (more so in python) is to name your methods, variable with utmost care. Since getNormal() would return a MVector in bot

Re: [Maya-Python] maya api question

2016-07-25 Thread Justin Israel
On Tue, Jul 26, 2016 at 1:04 PM likage wrote: > Hi all I am trying to do and learn some maya api (I have zero knowledge of > them) > The following code was taken from an example that I have read online and > while testing it out, I have a few questions in mind.. > > 1. In that test() function, as

[Maya-Python] maya api question

2016-07-25 Thread likage
Hi all I am trying to do and learn some maya api (I have zero knowledge of them) The following code was taken from an example that I have read online and while testing it out, I have a few questions in mind.. 1. In that test() function, as the world_pos variable is calling out to the Point clas

[Maya-Python] maya api - MFnMesh::allIntersections, too slow

2015-08-23 Thread sam
Hello all, im kind of stupid when it comes to using the api, but i needed it to check for intersections in my mesh when firing rays out from a particular point. In my script i need to be firing a hell load of rays. Probably around 500 by the end. my program currently takes 23 seconds to proce

[Maya-Python] [Maya-API] MpxFielnode - Custom Field node and how to access the volume control

2015-07-26 Thread MicheleA
Hi there, Working on a custom field, and I was trying to find in the class documentation and online for example on how to use/access the volume control attributes. Is this even possible or i have to create my volumes from scratch and forget about it? The examples provided in the doc (like to

Re: [Maya-Python] Maya api input in time

2015-07-18 Thread Todd Widup
ok...wasn't sure..i remembered there being something about setting the context and such On Sat, Jul 18, 2015 at 9:55 PM, Christopher Crouzet < christopher.crou...@gmail.com> wrote: > You mean, at a time you'd specify? If so, in the same way that you'd query > any attribute: through the method `MP

Re: [Maya-Python] Maya api input in time

2015-07-18 Thread Christopher Crouzet
You mean, at a time you'd specify? If so, in the same way that you'd query any attribute: through the method `MPlug::getValue()`. http://help.autodesk.com/cloudhelp/2016/ENU/Maya-SDK/cpp_ref/class_m_plug.html#a64f7093bfde5c5eb9d89b32635b772aa On 19 July 2015 at 09:45, Todd Widup wrote: > Worki

[Maya-Python] Maya api input in time

2015-07-18 Thread Todd Widup
Working on a c++ pluginDone this once like 6 years ago How do I query the value of an input connection in time in the api? Sent from my iPhone -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from thi

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Justin Israel
On Thu, May 14, 2015 at 4:53 AM Nicolas Combecave wrote: > > > I can probably only point you at this: > > >> >> http://www.fxguide.com/featured/barbershop-at-weta-sci-tech-winner-explained/ > > > Yeah I did read this one, but it wasn't clear to me if the interactive > tools were accessible from w

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Nicolas Combecave
> > I can probably only point you at this: > > http://www.fxguide.com/featured/barbershop-at-weta-sci-tech-winner-explained/ Yeah I did read this one, but it wasn't clear to me if the interactive tools were accessible from within maya or just the core, which may be related to render the hairs.

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Tuan Nguyen
Oh, i got it. However, to develop a huge system like that will take a lots of jobs, times and works. Well, that's how big company going:D -- 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] Maya API macro : How did they work?

2015-05-13 Thread Justin Israel
On Wed, 13 May 2015 10:06 PM Tuan Nguyen wrote: @Justin : For those in-house tool, you guys wrote everything from the scratch, a new system or still base on Maya's core? Like I said, many parts of these things can be completely standalone, and then integrated into Maya and other host applicati

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Tuan Nguyen
@Justin : For those in-house tool, you guys wrote everything from the scratch, a new system or still base on Maya's core? -- 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 e

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Justin Israel
On Wed, 13 May 2015 9:07 PM Nicolas Combecave wrote: About barberShop, is it a completely stand-alone tool or is it integrated in maya in any way? I can probably only point you at this: http://www.fxguide.com/featured/barbershop-at-weta-sci-tech-winner-explained/ ... Which describes it bei

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Nicolas Combecave
About barberShop, is it a completely stand-alone tool or is it integrated in maya in any way? 2015-05-13 10:17 GMT+02:00 Justin Israel : > > > On Wed, May 13, 2015 at 5:08 PM Tuan Nguyen wrote: > >> I'm not exactly sure what you are asking here, but if it is something for >>> use inside of Maya,

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Justin Israel
On Wed, May 13, 2015 at 5:08 PM Tuan Nguyen wrote: > I'm not exactly sure what you are asking here, but if it is something for >> use inside of Maya, then it will have to use the Maya API in some capacity >> to integrate as a plugin. >> > Nah, you already gave me the answer i ask for :) What insi

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-13 Thread Tuan Nguyen
Yeah, i look after Maya's source. Sometimes it easy for me to read it directly to understand 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 receiving emails from it, sen

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Marcus Ottosson
Oh btw, are there any parts of maya open-source? It’s got plenty of open source components, but that’s probably not what you’re after. - http://www.autodesk.com/company/legal-notices-trademarks/open-source-distribution ​ On 13 May 2015 at 06:08, Tuan Nguyen wrote: > I'm not exactly sur

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Tuan Nguyen
> > I'm not exactly sure what you are asking here, but if it is something for > use inside of Maya, then it will have to use the Maya API in some capacity > to integrate as a plugin. > Nah, you already gave me the answer i ask for :) What inside of Maya should use Maya API to handle. For other in-h

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Justin Israel
On Wed, 13 May 2015 3:17 PM Tuan Nguyen wrote: I though so too. Hey, Justin, since you're working on top company like Weta , how do they develop inhouse tool ( like custom Fur, Hair, deform, render system ... )? It still base on Maya's core, or it completely new ? Can you give me some experimen

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Tuan Nguyen
I though so too. Hey, Justin, since you're working on top company like Weta , how do they develop inhouse tool ( like custom Fur, Hair, deform, render system ... )? It still base on Maya's core, or it completely new ? Can you give me some experiment about it? :D -- You received this message becau

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Justin Israel
I don't know of any part of Maya that is open source. You get a public API to work with. On Wed, May 13, 2015 at 2:56 PM Tuan Nguyen wrote: > Yup, of course. > Oh btw, are there any parts of maya open-source? Or they just provide us > the API library? > > -- > You received this message because

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Tuan Nguyen
Yup, of course. Oh btw, are there any parts of maya open-source? Or they just provide us the API library? -- 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, s

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Justin Israel
Well what I meant was actually writing and using your own macros are more prone to debugging issues. But using the ones provided by the Maya API, I am sure, are well tested. On Wed, May 13, 2015 at 1:45 PM Tuan Nguyen wrote: > Thank Justin for easy and clear explanation. I know there was a risk

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Tuan Nguyen
Thank Justin for easy and clear explanation. I know there was a risk using macro because of typesafe, however i like the way Maya use it with MStatus. I would love to do something like that with my code too :D -- You received this message because you are subscribed to the Google Groups "Python P

Re: [Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread Justin Israel
Hi, C++ has this thing called a preprocessor. It runs over the source code before it gets to the compiler, and can do a bunch of things like handling macros, and various conditional compilation directives. A macro is like a snippet, that can support patterns being swapped in. When you use a macro

[Maya-Python] Maya API macro : How did they work?

2015-05-12 Thread illunara
Hi everybody Maya's macro like check_mstatus_and_return_it used a lots. I just a bit confuse about how it works. In the document said, { Return if status is not MStatus::kSuccess

[Maya-Python] [MAYA API] How to get a array optionVar in C++

2014-12-24 Thread Sun Dawei
Hello, Merry Christmas and Happy New Year! I have a question about optionVars in maya, I could not find any api that can query and set array optionVars, there are only MGlobal::optionVarIntValue, MGlobal::optionVardoubleValue, MGlobal::optionVarStringValue in maya api. is there a way to get

[Maya-Python] maya API deformer

2014-02-24 Thread laurent Pic
Hi, First of all, this is my first deformer, so please excuse the dumb question if dumb it is. I'm completely stuck with a slot initialisation. I would like a slot that accepts an undefined ( dynamic ) number of vector as input ( I would think of a MFnVectorArrayData() ? ) so I'm going like: Vc

[Maya-Python] [MAYA API] Create object through a custom node.

2014-02-16 Thread dgovil
You can create this with a polygon shape node. There are a couple examples i believe in c++ in the dev examples that will show how to make the geometry. -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from

[Maya-Python] [MAYA API] Create object through a custom node.

2014-02-16 Thread anthony
Hi, I would like to create a dependency node ( or maybe I need another type of node ), but I don't know if what I want to do is possible. The idea will be to have one input attribute ( an integer ), and depending on the value of that attribute object would get created in the scene, e.g the user

Re: [Maya-Python] [MAYA API] Create objects through custom node.

2014-02-16 Thread Anthony Durand
Hey Marcus, Thanks a lot for the links. I will take a look into all of that. The principle of the copy node from Houdini and the Copier from SOup seems close to what I would like to do. Thanks Anthony -- You received this message because you are subscribed to the Google Groups "Python Progr

Re: [Maya-Python] [MAYA API] Create objects through custom node.

2014-02-16 Thread Marcus Ottosson
Oh, and almost forgot, SOuP have a node, Copier , which might do what you're looking for. Peter Shipkov, the guy behind most of the nodes, seem quite helpful on the forums and might help answer some questions about it and similar nodes

Re: [Maya-Python] [MAYA API] Create objects through custom node.

2014-02-16 Thread Marcus Ottosson
Are you thinking of something similar to the Copy SOP of Houdini? http://www.sidefx.com/docs/houdini10.0/nodes/sop/copy I've seen similar custom nodes like that before so I believe its possible. Perhaps have a look at the MASH nodes. It doesn't seem to do what Copy S

[Maya-Python] [MAYA API] Create objects through custom node.

2014-02-16 Thread Anthony Durand
Hi, I want to create a custom dependency node ( maybe I need to that with another type of node ), but I don't know if what I want to do is possible, that's why I'm here, I'm sure one of you guys will be able to help me. The basic idea is this one, I would like to have a node with a numeric inp

[Maya-Python] Maya API/MakePaintable question

2013-09-10 Thread Emre Yilmaz
My memory is that you just set the default value you want on the attribute, like you would with other attributes like non-array attributes, before you make it paintable. When it is paintable, it'll still have that default value and you should see it that way in the Artisan tools. In other words, t

[Maya-Python] Maya API/MakePaintable question

2013-09-10 Thread Todd Widup
going thru Chad Vernon's api video...and a question popped up. is there a way to set the default value of a paintable attributes weight map? normally they come in at white (1.0) but what if I wanted it to default to 50% grey -- Todd Widup Creature TD / Technical Artist t...@toddwidup.com todd.w

Re: [Maya-Python] Maya API tuts

2013-03-08 Thread Panupat Chongstitwattana
Chad has an intro tutorial which is pretty recent. http://www.youtube.com/watch?v=7Uya-I9T2iM http://www.chadvernon.com/blog/resources/maya-api-programming/ On Fri, Mar 8, 2013 at 4:59 PM, Ricardo Viana wrote: > Hi guys. I come from art background and slowly been learning python on my > own s

[Maya-Python] Maya API tuts

2013-03-08 Thread Ricardo Viana
Hi guys. I come from art background and slowly been learning python on my own so I can write my own tools. I know some things now with simple scripts . But I wanted to step up writing plugins. The thing is I kinda bumped into a wall. I can't understand the API docs . Does anyone know of a good int

[Maya-Python] maya api and fluid

2011-05-04 Thread goofoo
Hello. Maya node fluidShape have attribute ouyGrid. What is it and how can it be used? I have a problem. I take the data from maya fluid container and try to render in maya viewport using GPU. Everything works, but the transfer of data from maya fluid container in my container is very slow. The cal

[Maya-Python] maya api set weights

2009-04-12 Thread sunny
hi all, i have two question on maya python api. actually i am writting a simple code to modify skinweights any help be appreciated.. how to supress warning messages in maya pyhon api. i am setting skinweights using " MFnskinCluster.setWeights " function but i am getting warning message (but all t