Re: [Maya-Python] can you query a mesh position table prior to any deformations

2014-05-30 Thread Daniel Lindsey
Yeah. That was my initial plan but I didn't like it. Hoped there was a better way -- 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 pytho

[Maya-Python] API MFnMesh SetFaceVertexNormals

2014-05-30 Thread Joe Weidenbach
Hello again all, I'm working on what will eventually be a mesh tool that will handle mirroring, defining snap points, etc. I'm trying to get the API down as I go. So far, I've got it copying the basics of the mesh just fine (and it drops down to the object space, so it doesn't need to worry abou

[Maya-Python] Setting up a virtual renderfarm

2014-05-30 Thread Marcus Ottosson
Hi all, I’m looking to set up a dozen virtual computers to act as my renderfarm whilst developing tools for task distribution. I’m having a look at http://docker.io, does anyone have experience with it or something similar/better suited? Each worker will essentially run time.sleep(10) commands t

Re: [Maya-Python] Setting up a virtual renderfarm

2014-05-30 Thread Justin Israel
I was playing with docker earlier this week since I also want to integrate it at work. Although the only thing I see it being related to for your question is being able to distribute a ready made container that will just do what you want when it starts up. Is that what your question is about? On M

[Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
Hi all, I’m developing an example program to illustrate the benefits and disadvantages of a service-oriented approach to task-distribution; mimicking the instant message-approach to routing messages from one-to-many via a central broker, it’s not quite at the point where pros and cons start showin

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Justin Israel
You could just register all your different endpoints or types in a dict where the key is the type and the value is the handler function. And each handler function could do the custom logic that transforms the message into a conformned message for the output. On May 30, 2014 11:57 PM, "Marcus Ottos

Re: [Maya-Python] Setting up a virtual renderfarm

2014-05-30 Thread Marcus Ottosson
I would assume so, not sure yet of absolute requirements, I'm expecting to find out as I go. But I would imagine the requirements would be similar to workers in any traditional renderfarm. Is docker suited for something like that you think? I'm interested in it having its own dependencies too and

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
Something like this? https://github.com/abstractfactory/labs/blob/master/python/messaging/chat/swarm.py#L57 On 30 May 2014 13:04, Justin Israel wrote: > You could just register all your different endpoints or types in a dict > where the key is the type and the value is the handler function. An

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
Are you looking to write a chat like program or are you interested in having tasks executed by workers on the other side of the "swarm"? Have you looked at celery ? It deals with sending tasks to a broker, routing them using exchanges + queues and having the tasks e

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
Both. Tasks are to be scheduled via a chat-like interface. Humans send tasks via a terminal whereas workers build messages programmatically. For example, the command.. $ order coffee latte --no-milk ..should send a task to the swarm who will in turn delegate the task to workers capable of execut

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
I've used Celery pretty extensively at this point. We use it primarily for running various tasks that users don't have permissions to run locally. I basically wrapped it all up into a library that makes it super simple to add new methods with optional tasks associated with them that offers both a

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
That is excellent, Tony, thanks! I'll give that a go, look through the code, and hopefully that takes care of the routing and task-creation questions I had. To be continued. On 30 May 2014 14:23, Tony Barbieri wrote: > I've used Celery pretty extensively at this point. We use it primarily > f

Re: [Maya-Python] Distributing or hosting module?

2014-05-30 Thread Tony Barbieri
I'm very interested in looking into Rez. Here at Psyop, we run all 3 OS's (Windows, OSX and CentOS 6.*). Windows is the predominate OS for artists and workstations so are there any updates on the 2.0 branch and windows support? Is the windows fork up to date and usable? Happy to help with any i

Re: [Maya-Python] Distributing or hosting module?

2014-05-30 Thread Marcus Ottosson
That would surely be helpful, Tony. At the moment, both me and Thorsten are invested in other projects and mainly awaiting a usable release of Rez 2.0 on any platform (which will be Linux for starters). Once it's up and running there, we can start looking at getting it running on Windows and from

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
There was actually one more thing, Tony. Would you mind have a quick scan through the set of requirements I set out for Chat, and let me know if you find any that would be tricky or excellent with Celery? https://github.com/abstractfactory/labs/tree/master/python/messaging/chat#requirements On

Re: [Maya-Python] Stalker

2014-05-30 Thread Nils Lerin
Regarding the addition of storing TEXT such as JSON. Whouldn't that just mean adding a attribute/column to a entity of type text to hold your data? Or am I missing something? On Fri, May 30, 2014 at 8:00 AM, Marcus Ottosson wrote: > Ah sorry, missed the quoted part. Thanks for clearing that up!

Re: [Maya-Python] Stalker

2014-05-30 Thread Marcus Ottosson
I'm assuming they're referring to having serialisation/de-serialisation happen server-side/automatically. As anything, even Py objects, could get stored as text anywhere. On 30 May 2014 15:17, Nils Lerin wrote: > Regarding the addition of storing TEXT such as JSON. Whouldn't that just > mean ad

Re: [Maya-Python] Stalker

2014-05-30 Thread Fredrik Averpil
Yes. On Fri, May 30, 2014 at 4:17 PM, Nils Lerin wrote: > Regarding the addition of storing TEXT such as JSON. Whouldn't that just > mean adding a attribute/column to a entity of type text to hold your data? > Or am I missing something? > > -- You received this message because you are subscrib

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
I guess if you are writing a true "chat" client it may not be the way to go, but if you are looking to run distributed tasks then it should fit the bill. You may need to combine a few technologies together rather than just relying on Celery. I'm not sure you'll have the control over sending a tas

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
I guess if you are writing a true “chat” client it may not be the way to go How come? The purpose of this experiment is to find differences in how a chat application deals with message-passing and how a cloud of workers is assigned tasks and so far I haven’t encountered any differences; only simi

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
I do see your point, what I meant was I'm not sure Celery is going to give you the granularity you may require. I wasn't suggesting there aren't similarities conceptually. I am working with specialized groups and single cloud. Some workers will process anything, while other workers have been set

Re: [Maya-Python] Stalker

2014-05-30 Thread Chad Dombrova
I've got to admit, I don't love the idea of storing pickle strings in a database. There are so many ways that it can go wrong based on differences between the environment on the machine that writes the pickle and the one that reads it.  Pickles are a great short term storage format, but they are

Re: [Maya-Python] Stalker

2014-05-30 Thread Tony Barbieri
I agree with Chad and Justin. I would avoid storing a pickles for all the reasons listed above. Storing a data type that can only be read by a specific language in the db seems to be getting too specific. On Fri, May 30, 2014 at 11:22 AM, Chad Dombrova wrote: > I've got to admit, I don't love

Re: [Maya-Python] Stalker

2014-05-30 Thread Marcus Ottosson
I'm with Chad on this one. In fact, I'd stay away from pickle altogether; if for no other reason than to enforce thought into what data you eventually end up persisting/send across a network. Pickle is much to kind in what you're allowed to send/store. On 30 May 2014 16:22, Chad Dombrova wrote:

Re: [Maya-Python] Stalker

2014-05-30 Thread Fredrik Averpil
You are probably completely right. I wasn't thinking of storing anything but plain text initially. I'm using MySQL (not Postgres) and to my knowledge there's no special JSON field type so it'll just be plain text. // Fredrik On Fri, May 30, 2014 at 5:25 PM, Marcus Ottosson wrote: > I'm with C

Re: [Maya-Python] Stalker

2014-05-30 Thread Marcus Ottosson
Storing plain-text as pickled Python objects? On 30 May 2014 16:33, Fredrik Averpil wrote: > You are probably completely right. I wasn't thinking of storing anything > but plain text initially. I'm using MySQL (not Postgres) and to my > knowledge there's no special JSON field type so it'll just

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
It looks like you can use ZeroMQ with celery as the transport and something else to handle the results (Redis or MongoDB?) I think I’ll have to wrap my head around how Celery works before I can digest this one (a separate MQ to handle return values?) you don’t think they would be performant do th

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Marcus Ottosson
I just noticed the initial link to the method in question was wrong, here's is the actual line with if/else statements: https://github.com/abstractfactory/labs/blob/ef788903194423c851337f49c8d202f6cb745e1f/python/messaging/chat/peer.py#L76 On 30 May 2014 17:42, Marcus Ottosson wrote: > It looks

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
Yes, it seems that celery does not support using ZeroMQ for both transport (sending the task over the pipe) and the results from said task. A different result backend would need to be used (RabbitMQ, Redis, Mongodb). There is a list of supported backends here: http://celery.readthedocs.org/en/lat

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Chad Dombrova
Hey tony, how do you mange and monitor all of your celery workers? for me that has been the main roadblock for celery adoption. we started working on some modifications to flower, celery's web-based monitor app, to give it the ability to view task logs. without that, it seems like the only optio

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
Hey Chad, Yea, that is a big issue. I am using flower for monitoring. I only set that up recently, before that I was also using the logs which I agree is a huge PITA. Flower works pretty well although if you shut down the web server, you lose the task history. I'm sure it could be extended to

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Chad Dombrova
cool stuff, tony. do you use celery to do multi-worker distributed disk crawls, like finding all the files below a given directory? this is another use case that I'm very interested in. also, btw, there is an option in flower to persist the tasks states to disk, but there's a simple bug that ne

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Tony Barbieri
Thanks, chad! We haven't used it for that although it's a very interesting idea. We've just started writing some tools for crawling hierarchies, using Celery to distribute the work sounds like a very interesting idea... Also good to know about the persistent option, I'll give that a look if we

Re: [Maya-Python] Setting up a virtual renderfarm

2014-05-30 Thread Justin Israel
Docker looks well suited for deploying an application that is already set up in its own environment by a developer. I like the idea because it moves the build step over into the developer's responsibility. So like, if I set up my docker container exactly how I want, and test it, and it works, then

Re: [Maya-Python] Stalker

2014-05-30 Thread Justin Israel
Yea totally agree with Chad's detailed reasons not to put pickle data in a database. It is much better suited for a private data store used specifically by a python application, and not a generic storage format. I think Postgres also has other really awesome field types like being able to store dic

[Maya-Python] Senior Java Dev at Weta

2014-05-30 Thread Justin Israel
I've posted something like this in the past, but its a new job posting so I thought I would share it again. It is also related to some of the other topics that have been going on in the mailing list lately. Know any hardcore java developers that wanna move to New Zealand? http://careers.stackoverf

Re: [Maya-Python] Stalker

2014-05-30 Thread Erkan Özgür Yılmaz
I see, you are all right about pickled data and I've had issues with them. I think I should consider using only plain json formatted text as custom data where needed. Ozgur eoyilmaz.blogspot.com On May 30, 2014 11:45 PM, "Justin Israel" wrote: > Yea totally agree with Chad's detailed reasons no

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Justin Israel
Hey Tony, I haven't used celery for more than a super simple addition as a local background task queue to a Django server, so I thought I would ask specifically related to the render farm concept that Marcus mentioned, and celery's granularity. Does celery give you the control to define the schedu

[Maya-Python] Re: Query primary joint axis

2014-05-30 Thread flaye
Excellent! Thank you for the insight Andres. Much appreciated. On Thursday, May 29, 2014 3:21:01 PM UTC-4, Andres Weber wrote: > > You pretty much got it, you're missing a ws=True flag in your xform > command (that way we get the worldspace instead of the local space...just > in case the transfo

[Maya-Python] Re: API MFnMesh SetFaceVertexNormals

2014-05-30 Thread Joe Weidenbach
Figured it out. Actually, it makes perfect sense now. I rewrote the whole thing in C++ so I could make sure the logic was sound, and in the process figured out why things weren't working (as well as getting a better understanding of the API as a whole). For future reference (I know most of you p

Re: [Maya-Python] Re: API MFnMesh SetFaceVertexNormals

2014-05-30 Thread Justin Israel
Ah ya. That's the fun of dynamically typed languages huh? Big surprises at run time. On May 31, 2014 12:08 PM, "Joe Weidenbach" wrote: > Figured it out. Actually, it makes perfect sense now. I rewrote the > whole thing in C++ so I could make sure the logic was sound, and in the > process figur

Re: [Maya-Python] Re: API MFnMesh SetFaceVertexNormals

2014-05-30 Thread Joe Weidenbach
true that :) On Fri, May 30, 2014 at 5:16 PM, Justin Israel wrote: > Ah ya. That's the fun of dynamically typed languages huh? Big surprises at > run time. > On May 31, 2014 12:08 PM, "Joe Weidenbach" wrote: > >> Figured it out. Actually, it makes perfect sense now. I rewrote the >> whole t

[Maya-Python] finding all input deformer Node from an object by API way

2014-05-30 Thread Rishis3D
Hi ,, what's the fasted way to find all the input deformers Node (all kind of deformer Node) from an given object by using python API ? Actually i got the result by using listHistory cmd with some condition and filters.. but its slow.. i want to increase the performance by using API.. could any

[Maya-Python] python for loop with a mel function included

2014-05-30 Thread miafgh
hello i want to do a planar mapping of four objects like this: import maya.mel as mm for i in range(12,15): mm.eval("polyProjection -ch 1 -type Planar -ibd on -kir -md z pCube%s.f[4:6] pCube%s.f[8];" % i) sadly this wont go...does anyone know how to do this ? I would be very thankful:)