Re: [Maya-Python] Maya 2024 pyMel ;(

2023-04-12 Thread Yury Nedelin
Thanks for the update Chad.
Yury


On Wed, Apr 12, 2023 at 9:21 AM Chad Dombrova  wrote:

> Hi all,
> PyMEL 1.3.0 has been released with support for 2023, and 1.4.0b1 has been
> released with support for 2024.  To install the beta for 2024 pip install
> with --pre flag.
>
> PyMEL is definitely still actively developed, as you can see from the
> features discussed in this blog post:
> https://dev.to/chadrik/pymels-new-type-stubs-2die
>
> As for why PyMEL is no longer bundled with Maya, I'll do my best to
> summarize the discussions with Autodesk on this topic.  Firstly, there
> seemed to be the impression that the new python API 2.0 solved the problems
> with python scripting in Maya, which is an assessment that I don't agree
> with.  Nothing has appreciably changed with the ability to use maya.cmds
> with the C++ API wrapper(s) in the 15 years since python was first added to
> Maya.  One pain point from Autodesk's perspective was that releasing Maya
> required a certain amount of cooperation between Autodesk and the PyMEL
> developers, which added extra steps for them and slowed them down, which is
> a point I totally understand.  Their assessment was that the pros of
> installing via PyPI -- decoupled release schedules, esp the ability to
> release patch fixes to PyMEL -- outweighed the cons -- extra steps for
> users and headaches with installing behind a firewall.  And lastly, I think
> there was the feeling that there's a world of open source projects out
> there for Maya, so "why should PyMEL get special status?"
>
> What we're seeing with the delayed release of pymel for 2023 is one of the
> downsides of the new arrangement:  the lack of a hard deadline to get PyMEL
> released in time to be bundled with Maya means it doesn't always make it to
> the top of the issue stack at Luma (I managed to get all of the release
> work done for 2023 and 2024 on my vacation and while sick).
>
> If there are others out there who would like to cooperate on PyMEL, we're
> happy to do so.  The release process is very well documented, and I make an
> effort to improve it every time I do the process.
>
> I hope that clears things up.  Let me know if you folks have any questions
> and I'll do my best to answer them.
>
> -chad
>
>
> On Sun, Apr 2, 2023 at 5:12 AM Marcus Ottosson 
> wrote:
>
>> Hm, true. Could be as simple as that.
>>
>> - https://github.com/LumaPictures/pymel
>>
>> [image: image.png]
>>
>> Still, surprised there was no conversation; I'd imagine someone may want
>> to take over, especially since a lot of pipeline out there depend on it.
>>
>> On Sun, 2 Apr 2023 at 11:59, Justin Israel 
>> wrote:
>>
>>> The last tag was in Nov 2021
>>> Could it be that it's not actively maintained anymore so Autodesk
>>> stopped bundling it?
>>>
>>> On Sun, 2 Apr 2023, 9:38 pm Marcus Ottosson, 
>>> wrote:
>>>
 I've also tried getting to the bottom of why PyMEL stopped being
 included to begin with in 2023, assuming I missed a conversation somewhere.
 But it appears to have happened out of the blue over at Autodesk
 headquarters? :O Maybe @Chad Dombrova  knows more?

 On Sun, 2 Apr 2023 at 00:28, Justin Israel 
 wrote:

>
>
> On Sun, 2 Apr 2023, 11:23 am Abdelhalim abulmagd, <
> abdelhalim.abulm...@gmail.com> wrote:
>
>> Why pymel not available?
>>
>
> Seems like they might have stopped shipping with PyMel as of 2023 and
> you need to manually install it?
>
>
> https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=GUID-2AA5EFCE-53B1-46A0-8E43-4CD0B2C72FB4
>
>
> https://help.autodesk.com/view/MAYAUL/2023/ENU/?guid=GUID-2AA5EFCE-53B1-46A0-8E43-4CD0B2C72FB4
>
>
>> On Sun, Apr 2, 2023, 12:36 AM DGFA DAG's GRAPHIC & FOTO ART <
>> gerome@gmail.com> wrote:
>>
>>> Hi,
>>> in Maya 2024 is no more pymel available so I have to switch to what
>>> ever...
>>>
>>> But I struggle with Maya cmds.
>>> How can I translate this to cmds?
>>>
>>> import pymel.core as pm
>>> # import os
>>> # import maya.mel as mel
>>> # main call
>>>
>>> def dags_menu():
>>> # call menu objects
>>> main_window = pm.language.melGlobals['gMainWindow']
>>> menu_obj = 'DagsMenu'
>>> menu_label = 'Dags Tools'
>>>
>>> if pm.menu(menu_obj, label=menu_label, parent=main_window,
>>> exists=True):
>>> pm.deleteUI(pm.menu(menu_obj, deleteAllItems=True, e=True))
>>>
>>> dags_menu = pm.menu(menu_obj, label=menu_label, parent=main_window,
>>> tearOff=True)
>>>
>>>
>>> project_menu(dags_menu)
>>> polygon_menu(dags_menu)
>>> object_menu(dags_menu)
>>> script_menu(dags_menu)
>>> material_menu(dags_menu)
>>> rigging_menu(dags_menu)
>>> camera_menu(dags_menu)
>>> light_menu(dags_menu)
>>> render_menu(dags_menu)
>>>
>>>
>>> # menu Items
>>> def project_menu(dags_menu):
>>> # Main Submenu Project
>>> # pm.

[Maya-Python] Our Game is shipped worldwide, RIVAL: CxC

2018-04-05 Thread yury nedelin
Rival: CxC is out worldwide!

We are extremely proud and happy to have you all see and enjoy our new
game. It has been a long journey with a single goal of shipping a game for
us and our friends to love.

Please check it out, enjoy it and give us a 5 star rating :)

Google Play Store: http://bit.ly/RIVAL_Google_DL

Apple App Store: http://bit.ly/RIVAL_Apple_DL


https://itunes.apple.com/us/app/rival-crimson-x-chaos/id1300704524?platform=iphone&preserveScrollPosition=true#platform/iphone


https://www.youtube.com/watch?time_continue=10&v=2HzWw-V1s3Y


Yury
Enjoy

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScjUG9T8%3DFQH8zY%2BEt0rREOOywoVug2hGX2axOA2iN%2BcYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Re: some Mel toughts

2017-08-19 Thread yury nedelin
I am curious , why not python ?
Yury

On Sat, Aug 19, 2017 at 2:46 PM, Cedric Bazillou 
wrote:

> Like the other people said its a scripting language, and your variable are
> strongly typed ( so what is the point of whining :its normal to be confused
> when to start using something new...)
> most of what you said for string manipulation has an equivalent in mel (
> just need to learn how the docs are organized )
>
> SO yeah its more difficult but you dont need OOp everywhere certainly not
> and at a scripting level ( automation and normal user executing code they
> drag from the script editor...).
>
> A lot of people tend to be lure into aesthetics part of code when its the
> functionality and robustness which matters ( code maintenance and upgrade
> is another beast ).
> When you will be a bit more c++ savy you can create your how nodes a
> command to do the actual work i you dont like mel syntax (for other people
> we work together at ilion btw )?
>
> Le vendredi 18 août 2017 17:08:56 UTC-5, Rudi Hammad a écrit :
>>
>> Hello,
>> I recently started a job in a studio that relies only on Mel, where
>> python is officially forbidden to use. I never used mel before. Since I am
>> familiar with C++ it was easy to learn, but still, I would like to share
>> some thought and try to explain
>> why I don´t like it. I only know 3 languages, python, c++ and mel now, so
>> maybe you can shed some light and tell me if my thoughts are wrong or if
>> you agree:
>>
>> 1-Why do you need to declare the data types in a high level scripting
>> languages? Aren´t data types declaration supposed to help manage memory to
>> optimize your programs? Since mel is high level, do you really need
>> declaring data types?
>>
>> 2-the dollar sign before each variable. why? it feels that mel is not
>> smart enough to understand . It needs not only the declaration data type,
>> but also a $ to understand that you are creating a variable.
>>
>> 3-working with strings is excruciating in Mel. In python, since
>> everything is an object you can access all the string methods.
>> .capitalize(), .split() etc... To do simple .split in mel, you have to
>> create a empty array first, then use a proc like tokenize, give it the name
>> to split, where to do the split, and cast it in the empty array, and
>> finally, retrieve the index you need in that array in python you simply
>> do somehting like myName = l_myControl_CTR.split("_CTR")[0]...
>>
>> 4- quote marks to have a variable take a return. so string $myArray[] =
>> `ls -sl`;
>>
>> 5- no default values on arguments?! you can' t do something like proc
>> myFunc(string $myName="foo", int $default=1)
>>
>> (6. Also of course not having dictionaries , no external library, no OOP,
>> no access to the API are also big things to consider)
>>
>>
>> My point is not to criticize anyone using Mel. This list is just to help
>> me understand a bit better how scripting languages compare to each other.
>> When you work in a studio with a huge Mel legacy you have to get along
>> with it. And I do, I already developed many thing is mel. My only problem
>> is that I am not allowed to use python, but it is what it is.
>>
>> Anyway, to sum up, for the reasons I exposed above, I find Mel not smart,
>> long, ugly, very painful when it comes to strings, and very limited.
>>
>> So as I said, my point is not to criticize Mel, but try to understand it
>> a little better. Do you agree with anything I said, or am I just crazy
>>
>> Thanks,
>> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/5c37a29e-ace2-470f-af93-
> 5233240f7509%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchO78a7TSV4wgTbYS3j7g%2BbJ6hGOT3xrmkBF7FXZzFtMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Jenkins P4 changelist help

2017-08-14 Thread yury nedelin
Can you start Maya from command prompt manually, without Jenkins? If not
what is the error you get , if you get one?


On Aug 14, 2017 8:52 AM, "Benjam901"  wrote:

> I found the file in question *"C:/Program Files
> (x86)/Jenkins/jobs/publish_package_on_p4_check_in/builds/changelog.xml" *and
> have set up my process to iterate files in the changelists found in this
> file, my process polls every minute checking for changes.
>
> I then run a post build job based on if Maya files are found in any
> changelist I then exit with an exit code that triggers a post build script.
>
> My post build script runs a new batch process that is supposed to boot
> Maya and pass in a script to run on boot but I cannot get Jenkins to run
> Maya. It get to the execution line and just hangs until I kill the process,
> is there a way to sucessfully boot a window exe like Maya through Jenkins?
> I feel I may be missing something.
>
> Cheers,
>
> Ben
>
> On Saturday, 12 August 2017 03:31:13 UTC+2, ynedelin wrote:
>>
>> P4 will create an xml file with full sync log for each build. Look for it
>> in Jenkins root. I will send you exact location later after I get in front
>> of a computer if you can not find it.
>>
>> On Aug 11, 2017 5:31 AM, "Benjam901"  wrote:
>>
>> Hello all,
>>
>> I am having trouble with my Jenkins build at the moment. I have
>> successfully set it up so that the P4 polling SCM is working correctly on
>> my specified directories which is good but the snag is getting the
>> changelists out into a separate build script.
>>
>> *Here is my proposed workflow:*
>> Poll every minute checking for changes in specified P4 dirs.
>> If changes are found run build and gather changelists.
>> Pass changelists to new build that runs python script to filter and run
>> processes on files etc.
>>
>> *The snag:*
>> The image below shows the summary of changes, I would like to be able to
>> get all changelist numbers and pass them to my python filtering script.
>> I have tried using P4_CHANGELIST in my console execution but it only
>> returns the latest change not all three as the image below illustrates.
>>
>> Cheers,
>>
>> Ben
>>
>>
>> 
>>
>> --
>> 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.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/python_inside_maya/1b05f7ba-5881-4794-8c9c-a8d02edbacd9%
>> 40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/21e3fd7d-9a5a-44ff-96a9-
> 7b5cd94c4860%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScj%2BLZJw3r2wEA7Wc1q5PZz24-AeTr4jDk4Ja8u1uTCE%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Jenkins P4 changelist help

2017-08-11 Thread yury nedelin
P4 will create an xml file with full sync log for each build. Look for it
in Jenkins root. I will send you exact location later after I get in front
of a computer if you can not find it.

On Aug 11, 2017 5:31 AM, "Benjam901"  wrote:

Hello all,

I am having trouble with my Jenkins build at the moment. I have
successfully set it up so that the P4 polling SCM is working correctly on
my specified directories which is good but the snag is getting the
changelists out into a separate build script.

*Here is my proposed workflow:*
Poll every minute checking for changes in specified P4 dirs.
If changes are found run build and gather changelists.
Pass changelists to new build that runs python script to filter and run
processes on files etc.

*The snag:*
The image below shows the summary of changes, I would like to be able to
get all changelist numbers and pass them to my python filtering script.
I have tried using P4_CHANGELIST in my console execution but it only
returns the latest change not all three as the image below illustrates.

Cheers,

Ben



-- 
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.
To view this discussion on the web visit https://groups.google.com/d/
msgid/python_inside_maya/1b05f7ba-5881-4794-8c9c-
a8d02edbacd9%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSch%2BjSOvPDOBJ_MC2XbtmRjoe19KhQbCdUBamRFkMC%2BLtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] bakeresults in Python is super slow

2016-12-25 Thread yury nedelin
Consider not using that command at all, unless you need all of it full
functionality. If you simply need the per frame position and rotation just
query it with something like xform() or get() and store it in data for
further use.  This function is handy but have always been slow and when I
was using for large bakes, few versions ago, it would kill memory if
numbers were high. Did you notice that it actually finishes the bake and
just stalls Maya for a while after that , it used to do that. Very
annoying.
Yury



On Sat, Dec 24, 2016 at 9:54 PM, Robert White 
wrote:

> Also, preserveOutsideKeys used to cause some major slowdown in 2014/2015.
> I believe the bug was finally fixed in 2016, so that might be another
> culprit.
>
>
> On Saturday, December 24, 2016 at 6:42:35 AM UTC-8, Jeremie Passerin wrote:
>>
>> Thanks Christopher,
>> I'll take a look that could be useful.
>>
>> I found what was the problem with my scene. It was the parallel
>> evaluation turned on.
>> I turned it off and things seem to work much better. I also suspended the
>> refreshing of the viewport, now I have some decent result.
>>
>> On Dec 24, 2016 06:10, "Christopher Crouzet" 
>> wrote:
>>
>>> Hey Gerem!
>>>
>>> I have no idea of what might be causing this slowdown with the Python
>>> version but I was curious to see how a quick and dirty custom
>>> implementation using the Maya API would fare, so I gave it a go. Here's the
>>> file: https://gist.github.com/christophercrouzet/e4daa884d4d4e08bc
>>> e24addfe820af4d
>>>
>>> It is a very naive implementation and it is the first time that I'm
>>> using the `OpenMaya.MDGContext` object, so chances are high that the
>>> code isn't optimal and could be speeded up. Also I didn't test it at all
>>> outside of the scene that it generates, so it might be crippled with bugs.
>>> And in all fairness it doesn't implement all the features covered by the `
>>> bakeResults` command, but still, it can be a starting point so give it
>>> a go to see if it helps. On my old laptop it takes 25 seconds to bake the
>>> animation on 6 attributes (pos + rot) for 500 locators over 400 frames.
>>> Maybe it'll be faster on your workstation?
>>>
>>> On a side note I'm currently working on a small library to help
>>> benchmarking code for Maya, maybe that'll interest someone around here?
>>>
>>>
>>> On 24 December 2016 at 05:56, Jeremie Passerin 
>>> wrote:
>>>
 Hello Maya coders !

 I'm having a weird issue right now using the bakeresults command in
 Maya 2016.5 (aka ext2)
 I've built a test scene with 500 locators constrained to 500 others
 that have a simple animation on 400 frames (Parent Constraint)

 When I bake the animation to fcurve using the MEL
 It's done in a about 40s
 When I do it in Python it takes almost 5 minutes
 I had to set simulation to False in Python otherwise... it's taking
 even longer... I wasn't able to get it to finish (I left it running for 2
 hours)

 Any idea ? any tips on baking a bunch of controllers that are
 constrained to something ?

 *MEL*
 timer -s;
 bakeResults -simulation true -t "1:400" -sampleBy 1
 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake
 false -removeBakedAttributeFromLayer false -removeBakedAnimFromLayer false
 -bakeOnOverrideLayer false -minimizeRotation true {"slave", [...],
 "slave500"};
 timer -e;
 // Result: 25.241 //

 *Python*
 from datetime import datetime as dt
 import maya.cmds as cmds
 start = dt.now()
 cmds.bakeResults("slave", [...], ["slave500"],
 simulation=False,t=(0,400),sampleBy=1,disableImplicitControl
 =True,preserveOutsideKeys=True,sparseAnimCurveBake=
 False,removeBakedAttributeFromLayer=False,removeBakedAnimFro
 mLayer=False,bakeOnOverrideLayer=False,minimizeRotation=True)
 print dt.now() - start
 >>> 0:04:44.691000


 Thanks,
 Jeremie


 --
 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.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/python_inside_maya/CAKq4km-qgWqQZpVMa9biYMuTTvSh8GiKdfM7
 y1xmNYZ%2BeivpKQ%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> --
>>> Christopher Crouzet
>>> *https://christophercrouzet.com* 
>>>
>>> --
>>> 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 

Re: [Maya-Python] Re: What is the correct / most efficient way for adding tools to Maya?

2016-10-01 Thread yury nedelin
I agree with Eric. It's an easy way to it.
On Sep 30, 2016 3:10 PM, "Eric Thivierge"  wrote:

> Sorry can't reply more than to say to look into Modules for packaging sets
> of tools.
>
> 
> Eric Thivierge
> http://www.ethivierge.com
>
> On Fri, Sep 30, 2016 at 5:00 PM, I73  wrote:
>
>> I am trying sys.path.append. is this suggested?
>>
>> --
>> 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.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/python_inside_maya/5d0a8ce5-50c4-42d0-8c9d-5ef8fc502bbd%
>> 40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAAjrnHsR%3DfRPF8AQe0ZWF-
> Z7NdD_Ko1azGDXFbik52jn9Ja_Ng%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScjFfmOqb_LDEOYMf2Xq3-vfD7dK4RSD%3Dex-2ctBEw-9NQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] pep 8 nameing convention for packages and modules

2016-09-24 Thread yury nedelin
You could use Build instead of Skeleton.
This would make sense since you already have skeleton in the rbskeleton,
then you will have rbs.Build()
It would also work well with other functions like rbs.Destroy()
On Sep 24, 2016 12:20 PM, "Rudi Hammad"  wrote:

> Hi,
> so I guess that in the end every one has his one logical way for the
> nomenclature. pep 8 says that packages should always be lowercase with no
> underscore, and module lowercase with underscore if needed.
> I have a package call rbskeleton, "rb" stands for rig builder. And the
> module is name skeleton. and the class inside the module is Skeleton .(or
> I could also name the class BuildSkeleton to add som variety , I don´t know)
> I have then
>
> import rbskeleton.skeleton as rbs
> mySkeleton = rbs.Skeleton()
>
> I don´t like repeating all the time skeleton, but there is no other way to
> describe it. what do you thing? Do you follow pep 8 convention on packages
> and modules
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/f6a528d2-d2ee-4cfa-9c9c-
> dbe8beda6bf6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSch2eDGtEv9S5Yx5MJ3Nc7ApdE9yiVpnf9X-tpR2DC%2B6CA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] I am trying to get a vert by position is there a way to do this in maya?

2016-09-22 Thread yury nedelin
As far as I know only components know where they are in world space. I
doubt there is anything like a table you can just look up quickly. You
might come up with some algorithms that will reduce number of verts needed
for test by maybe eliminating some objects first based on the distance. I
think if you have to deal with thousands of verts in runtime you might have
to use at least python API to get reasonable performance, if not c++.
What exactly are you trying to do ? Is that some sort of deformer or mesh
retopology tool?
On Sep 22, 2016 4:44 PM, "I73"  wrote:

> No, the reason being is I don't want to have a reference to anything. I
> want to just be able to select the verts and check if anything is close.
> I am currently trying with a 'Point Hash' but if you guys can think of
> anything else I am all ears.
>
>
> On Thursday, September 22, 2016 at 2:31:12 PM UTC-7, ynedelin wrote:
>>
>> Can you use objects names ?
>> On Sep 22, 2016 4:00 PM, "I73"  wrote:
>>
>>> Here is my problem, I have a list of verts and they are very close to
>>> another objects verts, I would like to be able to use (object A) list of
>>> verts to grab (object B) list of verts I don't want to iterate through
>>> (object B) verts because I want the code to act on any verts regardless of
>>> what object they are attached to. I don't want to have to select 2 objects
>>> for it to work, just the edge loop and see what's verts are closest.
>>>
>>> Is it possible to do this without looping through ever single vert in
>>> the scene and comparing the world position?
>>>
>>> Thanks!
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/python_inside_maya/0a2a338b-bfff-48c8-bd08-ad285d27c827%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/37e9495b-dce1-43af-b2fc-
> 9afa89726d2b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScjoQrnkQm8YXCK15NsJnUXXh0BGA%3Dz-FJv%2BzvpuKdgn%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] I am trying to get a vert by position is there a way to do this in maya?

2016-09-22 Thread yury nedelin
Can you use objects names ?
On Sep 22, 2016 4:00 PM, "I73"  wrote:

> Here is my problem, I have a list of verts and they are very close to
> another objects verts, I would like to be able to use (object A) list of
> verts to grab (object B) list of verts I don't want to iterate through
> (object B) verts because I want the code to act on any verts regardless of
> what object they are attached to. I don't want to have to select 2 objects
> for it to work, just the edge loop and see what's verts are closest.
>
> Is it possible to do this without looping through ever single vert in the
> scene and comparing the world position?
>
> Thanks!
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/0a2a338b-bfff-48c8-bd08-
> ad285d27c827%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSciHtMu1zm_OV-Kk-%3DAWx%2BTbVTXnGrJSqo0C-8xNVX078Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Optimise this: Hierarchy from String

2016-09-16 Thread yury nedelin
Is performance something you are concerned with for this process?
Yury
On Sep 16, 2016 6:16 PM, "Justin Israel"  wrote:

>
>
> On Sat, Sep 17, 2016 at 5:27 AM Alok Gandhi 
> wrote:
>
>>
>> Coming back to some of the points that Ian raised:
>> > Readability is a perfectly valid goal to seek but I
>> find maintainability is often overlooked.
>>
>> IMHO more readable code is more maintainable. Readability goes hand in
>> hand with maintainability. In fact, I very much agree that code lasts
>> longer than an author and if you write readable code it will be easier to
>> read and understand for the people after you are gone and are not available
>> to explain why you did what. If by maintainability you meant actually
>> extensibility, then it is a completely different aspect.
>>
>
> As an aside, I just recently went to a convention, and in one of the talks
> the speaker opened with his list of priorities for designing software:
>
> 1. Integrity - The software should operate in a predictable manner,
> respond appropriately to exceptional conditions, and clean up nicely during
> a termination
>
> 2. Readability - The intent of the code should be clear
>
> 3. Simplicity (has to be justified to be more important than #2)
> 4. Performance
>
> He basically yelled at us for 10 minutes about the importance of the first
> two, and said only when you can prove to me that everything else is
> addressed, that you should then look at performance. It was a pretty good
> talk.
>
>
>> > In driving to a solution avoiding the additional markup (as in my
>> solution or in json/XML) you've likely put yourself (and too often your
>> team after you've left) in a place where you'll need to rewrite the
>> function for future feature requests.
>>
>> If you read my previous posts in this threads, you will see that I
>> clearly mentioned that getting input is an administrative logic. In fact, I
>> provisioned for it and alluded to Marcus about it. Here's what I wrote:
>>
>>- Right in the beginning, we parse the string in a single line,
>>keeping the administrative logic out from the rest of our business code.
>>You can easily replace this single line with whatever parser you want.
>>
>> This means that the code that is responsible for creating nodes should
>> not worry itself with how it is getting the data in, JSON or YAML. And the
>> parser, whichever it is, should not worry about what is going to happen to
>> data it outputs. any good architecture should take care of this point.
>> Making components decoupled and flexible. Good architecture does not only
>> apply to huge libraries or big project, it should be given thought to every
>> single small quantum of code, a function and even inside parts of a
>> function. I did not avoid the input data structure, I simply did not work
>> on that part as was not required my Marcus originally. Even then, I
>> separated the code so that in my implementation, nowhere it does rely on
>> whether I choose JSON or YAML or some other markup. If ten years later,
>> somebody wants to use my implementation, with JSON the only change it would
>> require is to change the first line of my code.
>>
>>
>>
>> On Sat, Sep 17, 2016 at 12:56 AM, Marcus Ottosson > > wrote:
>>
>>> Thanks Ian!
>>>
>>> Some notes.
>>>
>>> - The implementation is up for grabs, but I'd like to keep the interface
>>> of the function; that is, passing a single string with indentation for
>>> hierarchy.
>>> - Performance is not important here, because (1) the function is only
>>> being used in example code, where the call itself should fall into the
>>> background and (2) creating a hierarchy can safely take a few hundred
>>> milliseconds if it means more readable code.
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/python_inside_maya/CAFRtmODtC8L1BiXxbTOHRH_
>>> KwK32ZxRZeo%3DatdrKgdkeThNzRw%40mail.gmail.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> --
>> 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.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/python_inside_maya/CAPaTLMT8pNLXc4XM7jT4AVQETE37Q
>> 9Z0pGYBBBjYZhYbLDHKMQ%40mail.gmail.com
>> 

Re: [Maya-Python] Re: print to show up right of the command line

2016-07-28 Thread yury nedelin
Do you mean when you run

print("something")

in Python in script editor in maya, it does not print the result in the
script editor but only in command line output?

Could you explain in more detail what you are doing.
Yury
On Jul 28, 2016 12:33 PM,  wrote:

> On Thursday, August 14, 2008 at 3:05:34 PM UTC-4, ynedelin wrote:
> > hey is there a way to have python print into the field right of the
> command line in Maya as it does if you print in mel?
> >
> > thanks
> > Yury
>
> Is there a way to re-direct print output back to the script editor without
> closing Maya?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/b4c245a5-e2ba-41f3-86c6-20a2b41b0154%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSch_NPQKwDbcKi%2BKAB%3DmLZxSfDuKV32aVx60fE-%2BXsXptg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] args & kwargs

2016-06-01 Thread yury nedelin
Look at this site
http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/

I would say looking at more examples will help.
The way I understand it - if function accepts *args then you can pass any
number of values(attributes, parameters) to it and then inside the function
these values can be processed and used, if function accepts **kwargs then
any number of key/value pairs can be passed to the function that can be
processed and used.
In Maya python **kwargs pattern is used for passing MEL flags to python
cmds version of the MEL command. For example cmds.ls(sl=true) - "sl=true"
is a key/value pair passed to cmds.ls function that accepts **kwargs.

That's my understanding, please correct me if I am wrong.

Yury
On Jun 1, 2016 8:03 AM, "Christopher."  wrote:

> Hi, I understand what a non-keyword is, basically an argument, while a
> keyword is an variable inside and argument.  What I'm having trouble
> understanding is *args & *kwargs. I found this site
> 
> but I'm still stuck. I'm not too familiar with loops at the moment so the
> example used on the site mentioned throws me a curve ball.
>
> I'm hoping someone can re-interpret how to use *args & **kwargs ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/159b1d5c-9ba3-49a4-b94b-09fc8089e088%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScisHLKQc3CoNf5LhXdadRAMEvDM1%3DAk%3DkgKqskfQVwqrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Listen on attribute change

2016-04-29 Thread yury nedelin
I was just wondering how will this method compare to build- in scriptJob.
On Apr 29, 2016 4:38 AM, "Justin Israel"  wrote:

>
>
> On Fri, 29 Apr 2016 3:39 PM yury nedelin  wrote:
>
>> Is this better then a scriptJob?
>> Yury
>>
>
> isn't a scriptJob the same thing (the c++ API being exposed to mel/python)
>
> Unless maybe you are suggesting that a Mel callback might have less
> overhead?
>
>
>> On Thu, Apr 28, 2016 at 2:06 PM, Justin Israel 
>> wrote:
>>
>>> Out of curiosity, what are the performance numbers like when your
>>> callback simply does nothing and passes? I am wondering if the required
>>> checks in your function body are slow, or if simply using a python-based
>>> callback is the slow part in the first place.
>>>
>>> Justin
>>>
>>>
>>> On Fri, Apr 29, 2016 at 8:25 AM Marcus Ottosson 
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I’ve managed to devise a method of listening in on an attribute
>>>> changing, so I can respond appropriately. But I’m interested in whether
>>>> there’s a more efficient way. Efficiency is my main concern in this case.
>>>>
>>>> import osimport timefrom maya import cmds, OpenMaya as om
>>>> # Setup scene
>>>> cmds.file(new=True, force=True)
>>>> cmds.polyCube()
>>>> # Find cube as MObject# Is this the optimal route?
>>>> dag_path = om.MDagPath()
>>>> selection = om.MSelectionList()
>>>> selection.add("pCube1")
>>>> selection.getDagPath(0, dag_path)
>>>> m_obj = dag_path.node()
>>>> # Callback listening to changes to ANY attribute# Is this efficient?def 
>>>> callback(message_type, plug, other_plug, client_data):
>>>> if not message_type & om.MNodeMessage.kAttributeSet:
>>>> return
>>>>
>>>> if "translateX" in plug.name():
>>>> print("Translate X changed!")
>>>>
>>>> job = om.MNodeMessage.addAttributeChangedCallback(m_obj, 
>>>> callback)#om.MMessage.removeCallback(job)
>>>>
>>>> The obvious issue is how I’m listening for changes on *any* attribute
>>>> change, rather than just the one I’m interested in, and then filtering it
>>>> down. The Python callback is triggered a few more times than I’d like.
>>>>
>>>> In an empty scene, without this callback, Maya is running at 1200-1300
>>>> fps (0.8ms/frame) whereas with this callback it’s running closer to 400
>>>> (2.5ms/frame).
>>>>
>>>> Any ideas?
>>>>
>>>> Best,
>>>> Marcus
>>>> ​
>>>> --
>>>> *Marcus Ottosson*
>>>> konstrukt...@gmail.com
>>>>
>>>> --
>>>> 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.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBppomMtcXWQvayoC07ht658JB2H5uZVWtnxcyHWrYynw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBppomMtcXWQvayoC07ht658JB2H5uZVWtnxcyHWrYynw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> 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.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2O%2Bpsyf37MdKVm6P6sGkNcsGD6hBHfNGC-6yRDJ6xK4A%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2O%2Bpsyf37MdKVm6P6sGkNcsGD6hBHfNGC-6yRDJ6xK4A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>
>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe f

Re: [Maya-Python] Listen on attribute change

2016-04-28 Thread yury nedelin
Is this better then a scriptJob?
Yury

On Thu, Apr 28, 2016 at 2:06 PM, Justin Israel 
wrote:

> Out of curiosity, what are the performance numbers like when your callback
> simply does nothing and passes? I am wondering if the required checks in
> your function body are slow, or if simply using a python-based callback is
> the slow part in the first place.
>
> Justin
>
>
> On Fri, Apr 29, 2016 at 8:25 AM Marcus Ottosson 
> wrote:
>
>> Hi all,
>>
>> I’ve managed to devise a method of listening in on an attribute changing,
>> so I can respond appropriately. But I’m interested in whether there’s a
>> more efficient way. Efficiency is my main concern in this case.
>>
>> import osimport timefrom maya import cmds, OpenMaya as om
>> # Setup scene
>> cmds.file(new=True, force=True)
>> cmds.polyCube()
>> # Find cube as MObject# Is this the optimal route?
>> dag_path = om.MDagPath()
>> selection = om.MSelectionList()
>> selection.add("pCube1")
>> selection.getDagPath(0, dag_path)
>> m_obj = dag_path.node()
>> # Callback listening to changes to ANY attribute# Is this efficient?def 
>> callback(message_type, plug, other_plug, client_data):
>> if not message_type & om.MNodeMessage.kAttributeSet:
>> return
>>
>> if "translateX" in plug.name():
>> print("Translate X changed!")
>>
>> job = om.MNodeMessage.addAttributeChangedCallback(m_obj, 
>> callback)#om.MMessage.removeCallback(job)
>>
>> The obvious issue is how I’m listening for changes on *any* attribute
>> change, rather than just the one I’m interested in, and then filtering it
>> down. The Python callback is triggered a few more times than I’d like.
>>
>> In an empty scene, without this callback, Maya is running at 1200-1300
>> fps (0.8ms/frame) whereas with this callback it’s running closer to 400
>> (2.5ms/frame).
>>
>> Any ideas?
>>
>> Best,
>> Marcus
>> ​
>> --
>> *Marcus Ottosson*
>> konstrukt...@gmail.com
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBppomMtcXWQvayoC07ht658JB2H5uZVWtnxcyHWrYynw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2O%2Bpsyf37MdKVm6P6sGkNcsGD6hBHfNGC-6yRDJ6xK4A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScgm_ZV8YLgaMHy3%3Dach1bA3YQq6bCWVyGTSE7hLdRzS0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] pyside UI and raising Exceptions into command line output

2016-02-02 Thread yury nedelin
maya 2015
windows 8

it seems as if /n is placed after the error statement when pyside UI is
involved.
I will make a little example later today.



On Mon, Feb 1, 2016 at 12:22 PM, Marcus Ottosson 
wrote:

> Could you provide a reproducible example? What platform? What version of
> Maya?
>
> On 1 February 2016 at 20:15,  wrote:
>
>> hey guys,
>>
>> It seems that when I raise an Exception from a funciton that runs as a
>> result of pyside UI it is not visible in the command line output.
>>
>> Is there a remedy for this?
>>
>> Thank you .
>> Yury
>>
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/3f88e37d-38a0-4b6d-bf67-f3aa0fa48e20%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> *Marcus Ottosson*
> konstrukt...@gmail.com
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB95njuy%2BR7QZK9gjp7Z1jbVWFUyshtmGzMehAtT%3Dh0Ag%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchbCJDYsN%2Bdc_0w4PJ%2BFFsKSoazFtRMBAT6hqKsJXLsDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] I need development and publishing workflow advice for my scripts

2015-12-19 Thread yury nedelin
Just curious, why not just have all of your Maya scripts in the location
that Maya can see? If you are working with python and you really like
separation between temp work and production ready work namespaces will
help. Having multiple environments for launching Maya as Justin suggested
is a really good workflow but you could also just add all of your script
locations to your local Maya env and just not worry about it.
On Dec 18, 2015 7:28 PM, "Justin Israel"  wrote:

> I'm not saying you should change your IDE or anything. I was only talking
> about your shell environment. But you are on Windows so that is a different
> story. You can use some form of env management like virtualenv Maya. but it
> still means you have to launch Maya from a shell or some environment
> managed launcher. Or you can write a tool that can adjust the sys.path
> within Maya
>
> On Sat, 19 Dec 2015 2:22 PM Rudi Hammad  wrote:
>
>> I am on windows 8. You mean this right?
>>
>> http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
>> yes they are python files. I am using eclipse. I remember that you told
>> me once that you used it at the beginning, and the you switched to another.
>> So far I am very happy with eclipse, so I am staying with it.
>> anyway...I´ll check virtualenv too because I am not sure what it is, and
>> symlinks. is symlinks a good solution?
>>
>>
>>
>>
>> El sábado, 19 de diciembre de 2015, 1:36:25 (UTC+1), Justin Israel
>> escribió:
>>
>>> If this is a Linux/osx environment, you could use something like
>>> virtualenv to switch between production and dev environments and then
>>> launch Maya from that shell env
>>> Are these python scripts that you need to import? You can also
>>> dynamically adjust your sys.path from within a running Maya to add extra
>>> package locations. And then if you are on linux/osx you can symlink your
>>> development locations to where you need them.
>>>
>>> On Sat, 19 Dec 2015 1:05 PM Rudi Hammad  wrote:
>>>
 Hello,
 I have my maya environment set to a specific root folders were I
 publish all my scripts,so I can import them later. Everything fine so far.
 I have in another hard drive, a structure of folders were I develop a
 lot of scripts, and when they are OK I copy them to the publish root
 folders.
 This development folders are not set up to the maya environment,
 because it would be crazy since they are a lot.
 Now, here is the problem. A lot of times, during the development, I
 need to import scripts that are not published yet because they are in
 progress.
 So I copy temporally the scripts in progress in the publish folder to
 be able to import them. And then I delete. This is not a clean work flow...
 I don´t know if I´ve explained my self...anyway, any workflow advice?
 thanks

 --
 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.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/python_inside_maya/d60956be-fa65-4c96-9b25-04a51447cc2f%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/31bcf9db-53e7-42cb-949f-ef4338a91861%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2F-9nqtfCfQoSbvVzy9AYRO-Q8L6uS5Udpdm31LiFwuQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this gr

Re: [Maya-Python] some # comments break my code!! // Error: Line 1.11113: Unterminated string.

2015-11-14 Thread yury nedelin
Post here exactly what you trying to run.
On Nov 14, 2015 4:43 AM, "Rudi Hammad"  wrote:

> it is weird because I can excute le code with success one time or two
> times. But after that it breaks. I have 2 errors:
>
> // Error: ...ta =
> [\"l_indexMetacarpal\",\"l_middleMetacarpal\",\"l_ringMetacarpal\",\"l_pinkyMetacarpal\"]\n
> for i in range(0,fin //
> // Error: Line 2.0: Unterminated string. //
>
> error...ta??? what is that
> My comments are like # mycomment or like #--[mycomment]--#. Do you thing
> that #--[mycomment]--# could be causing problems.
> But how can it work a couple of times with no errors, and then breaks?
>
>
> El sábado, 14 de noviembre de 2015, 7:23:49 (UTC+1), Geordie Martinez
> escribió:
>>
>> unterminated string usually means a typo.
>>
>> you have one too many quotes or forgot to put a quote.
>> your trace back will tell you which line it's happening in.
>>
>>
>> On Fri, Nov 13, 2015 at 6:07 PM, Justin Israel 
>> wrote:
>>
>>> Got an example of broken code?
>>> That fix you mentioned is only if you use Unicode characters within your
>>> source code.
>>>
>>> On Sat, 14 Nov 2015 12:47 PM Rudi Hammad  wrote:
>>>
 hi,
 so my code breaks when he wants...if I delete all the comments it works.
 If I leave the comments, sometime it works and other times it
 breaks...soo what is going on?
 I´ve read that addind at the beginning of my code the following solves
 the problem:

 #!/usr/bin/env python
 # -*- coding: utf-8 -*-

 but it doesn´t.
 what can I do?

 thanks

 --
 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.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/python_inside_maya/8a0861ca-0569-42eb-a918-03db2832542e%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0V_5QNKoFhb6aiHR%3DoCDpFTz90QSYZGfuiBrxRbaGfYQ%40mail.gmail.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/e95f862f-a693-46c7-a325-7c14cfe143da%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchJEEDE1Hu%2BscbcnRLyas6Cs9mF-1Nntrd%3DtN0MTsGa6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] optimizing code, unusual results

2015-11-04 Thread yury nedelin
Try looking up python cprofiler.
Yury
On Nov 4, 2015 6:47 AM,  wrote:

> Hi,
>
> im trying to make my script as efficient as possible. I have placed all
> these lines in my code to see how fast different sections are running and
> then just focusing on those areas.
>
> ###
> t0 = time.clock()
>
> print time.clock() - t0
> ###
>
> The problem is certain areas seem to take a long time when they have no
> need to.
>
> there is a loop in my script that just finds four points in space:
>
> pnt1=cmds.pointPosition('curve5.ep[2]')
>  pnt2=cmds.pointPosition('curve5.ep[4]')
>  pnt3=cmds.pointPosition('curve5.ep[5]')
>  pnt4=cmds.pointPosition('curve5.ep[6]')
>
> but the very first time the first line is called, the program takes 0.5
> seconds to complete, but then every time it loops through again it takes
> 0.0001 seconds to complete. Can anyone explain why this might be. really
> confusing. I presume it maybe loading curve into memory or something? dunno
>
> thanks,
> Sam
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/e7373880-cf36-4835-ad81-ca5d9d6e31fb%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScjzKZRjc4yyijNjPO%2BbZROKQzrNyev_rqPDWz4fxORz3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] script editor looses cursor after going to different software and coming back to Maya.

2015-10-16 Thread yury nedelin
Thank you Marcus! and Justin!
it works for me and seems ok to select Script editor always as it does.
Yury


On Fri, Oct 16, 2015 at 4:29 AM, Marcus Ottosson 
wrote:

> Intrigued by the possibility eliminating this minor annoyance, I followed
> Justin’s suggestion and wrote a solution.
>
> Run this, or put it in your userSetup.py, and it will restore focus to the
> Script Editor, if it is available.
>
> from PySide import QtCore, QtGui
> class RestoreScriptEditorFocus(QtCore.QObject):
> def eventFilter(self, obj, event):
> if event.type() != QtCore.QEvent.ApplicationActivate:
> return super(RestoreScriptEditorFocus, self).eventFilter(obj, 
> event)
>
> script_editor = next(w for w in QtGui.qApp.topLevelWidgets() if 
> w.objectName() == "scriptEditorPanel1Window")
> script_editor.activateWindow()
> return True
>
> f = RestoreScriptEditorFocus()
> QtGui.qApp.installEventFilter(f)
>
> It’ll also “restore” focus to it, even if it wasn’t the last thing to have
> focus at the time of leaving the Maya window. Whether that’s a problem or
> not is too soon to tell, but I’ll leave the implementation for that to the
> reader.
>
> Enjoy!
> ​
>
> On 15 October 2015 at 19:22, yury nedelin  wrote:
>
>> Well for now I have a ghetto workflow to avoid the mouse.
>>
>> I have assigned this mel command to the ALT+1 hot key
>>
>> *selectCurrentExecuterControl*
>> its in *scriptEditorPanel.mel*
>>
>> so now I do ALT+TAB ALT+1
>>
>> It seems none of Maya windows is selected when user ALT+TAB back to Maya
>> so just selecting menu panel of the script editor fixes this. I will try
>> Justin's solution later this week, it might all we need.
>>
>>
>> On Wed, Oct 14, 2015 at 2:49 PM, Marcus Ottosson 
>> wrote:
>>
>>> That only seems relevant to the command-line text input box, and not the
>>> script editor.
>>>
>>> I get this too, on Windows, and also find it quite bothersome. If a fix
>>> comes up, my mind would produce more endorphins.
>>>
>>> On 14 October 2015 at 19:24, Chris Lesage 
>>> wrote:
>>>
>>>> Hey Yury,
>>>>
>>>> If I understand correctly, this is a preference and if I remember it
>>>> isn't on by default.
>>>>
>>>> Preferences -> Interface -> Command Line: Hold Focus [x]
>>>>
>>>> Does checking this box solve your problem?
>>>>
>>>> Chris
>>>>
>>>>
>>>> On Wed, Oct 14, 2015 at 10:09 AM, yury nedelin 
>>>> wrote:
>>>>
>>>>> Justin,
>>>>> Thanks for replying, I will try this approach to put script editor in
>>>>> focus.
>>>>>
>>>>> There is an added issue of putting  the command input section of the
>>>>> script editor in focus.
>>>>>
>>>>> Yury
>>>>> On Oct 14, 2015 12:51 AM, "Justin Israel" 
>>>>> wrote:
>>>>>
>>>>>> I don't know much about this particular problem, since on my OSX
>>>>>> machine w/ Maya 2015 it does not lose focus. But you could probably 
>>>>>> install
>>>>>> an event filter on the QApplication, to detect the ApplicationDeactivate
>>>>>> and ApplicationActivate events. You could then handle checking if the
>>>>>> script editor is up and on top, and if so, give it editing focus again.
>>>>>>
>>>>>> Justin
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, 14 Oct 2015 5:30 PM ynedelin  wrote:
>>>>>>
>>>>>>> Behavior I am used to is this:
>>>>>>> if I am typing something in Maya Script Editor Command Input
>>>>>>> (bottom) section and then ALT+TAB into another software like Notepad and
>>>>>>> then ALT+TAB back into Maya my cursor is back in script editor at the 
>>>>>>> place
>>>>>>> I left it so I can continue to type stuff.
>>>>>>>
>>>>>>> This how it used to be on window machines in classic theme until
>>>>>>> windows 8 and that how it works on osx.
>>>>>>>
>>>>>>> I got a new machine with windows 8 and now when I ALT-TAB back to
>>>>>>> Maya script editor cursor is not back in the script editor's Command 
>>>>>>> 

Re: [Maya-Python] script editor looses cursor after going to different software and coming back to Maya.

2015-10-15 Thread yury nedelin
Well for now I have a ghetto workflow to avoid the mouse.

I have assigned this mel command to the ALT+1 hot key

*selectCurrentExecuterControl*
its in *scriptEditorPanel.mel*

so now I do ALT+TAB ALT+1

It seems none of Maya windows is selected when user ALT+TAB back to Maya so
just selecting menu panel of the script editor fixes this. I will try
Justin's solution later this week, it might all we need.


On Wed, Oct 14, 2015 at 2:49 PM, Marcus Ottosson 
wrote:

> That only seems relevant to the command-line text input box, and not the
> script editor.
>
> I get this too, on Windows, and also find it quite bothersome. If a fix
> comes up, my mind would produce more endorphins.
>
> On 14 October 2015 at 19:24, Chris Lesage 
> wrote:
>
>> Hey Yury,
>>
>> If I understand correctly, this is a preference and if I remember it
>> isn't on by default.
>>
>> Preferences -> Interface -> Command Line: Hold Focus [x]
>>
>> Does checking this box solve your problem?
>>
>> Chris
>>
>>
>> On Wed, Oct 14, 2015 at 10:09 AM, yury nedelin 
>> wrote:
>>
>>> Justin,
>>> Thanks for replying, I will try this approach to put script editor in
>>> focus.
>>>
>>> There is an added issue of putting  the command input section of the
>>> script editor in focus.
>>>
>>> Yury
>>> On Oct 14, 2015 12:51 AM, "Justin Israel" 
>>> wrote:
>>>
>>>> I don't know much about this particular problem, since on my OSX
>>>> machine w/ Maya 2015 it does not lose focus. But you could probably install
>>>> an event filter on the QApplication, to detect the ApplicationDeactivate
>>>> and ApplicationActivate events. You could then handle checking if the
>>>> script editor is up and on top, and if so, give it editing focus again.
>>>>
>>>> Justin
>>>>
>>>>
>>>>
>>>> On Wed, 14 Oct 2015 5:30 PM ynedelin  wrote:
>>>>
>>>>> Behavior I am used to is this:
>>>>> if I am typing something in Maya Script Editor Command Input (bottom)
>>>>> section and then ALT+TAB into another software like Notepad and then
>>>>> ALT+TAB back into Maya my cursor is back in script editor at the place I
>>>>> left it so I can continue to type stuff.
>>>>>
>>>>> This how it used to be on window machines in classic theme until
>>>>> windows 8 and that how it works on osx.
>>>>>
>>>>> I got a new machine with windows 8 and now when I ALT-TAB back to Maya
>>>>> script editor cursor is not back in the script editor's Command Input
>>>>> (bottom) but some other panel is in focus in Maya so now I have to grab 
>>>>> the
>>>>> mouse and click in the Command Input aria manually !
>>>>> This is very annoying.
>>>>>
>>>>> Anyone has any suggestions ?
>>>>> is there a way to force cursor into the Command Input section of the
>>>>> Script editor with code?
>>>>>
>>>>> Thank you
>>>>>
>>>>> Yury
>>>>>
>>>>> --
>>>>> 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.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/python_inside_maya/516e6c92-4325-42b4-8f01-24f2b164a1f8%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/python_inside_maya/516e6c92-4325-42b4-8f01-24f2b164a1f8%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>>> 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.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1B1_Zqkbwsp-%3Dk6Kf%3DDwU8fqpcuRqyHnxv%2BNN1m2r90g%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/python

Re: [Maya-Python] script editor looses cursor after going to different software and coming back to Maya.

2015-10-14 Thread yury nedelin
Justin,
Thanks for replying, I will try this approach to put script editor in focus.

There is an added issue of putting  the command input section of the script
editor in focus.

Yury
On Oct 14, 2015 12:51 AM, "Justin Israel"  wrote:

> I don't know much about this particular problem, since on my OSX machine
> w/ Maya 2015 it does not lose focus. But you could probably install an
> event filter on the QApplication, to detect the ApplicationDeactivate
> and ApplicationActivate events. You could then handle checking if the
> script editor is up and on top, and if so, give it editing focus again.
>
> Justin
>
>
>
> On Wed, 14 Oct 2015 5:30 PM ynedelin  wrote:
>
>> Behavior I am used to is this:
>> if I am typing something in Maya Script Editor Command Input (bottom)
>> section and then ALT+TAB into another software like Notepad and then
>> ALT+TAB back into Maya my cursor is back in script editor at the place I
>> left it so I can continue to type stuff.
>>
>> This how it used to be on window machines in classic theme until windows
>> 8 and that how it works on osx.
>>
>> I got a new machine with windows 8 and now when I ALT-TAB back to Maya
>> script editor cursor is not back in the script editor's Command Input
>> (bottom) but some other panel is in focus in Maya so now I have to grab the
>> mouse and click in the Command Input aria manually !
>> This is very annoying.
>>
>> Anyone has any suggestions ?
>> is there a way to force cursor into the Command Input section of the
>> Script editor with code?
>>
>> Thank you
>>
>> Yury
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/516e6c92-4325-42b4-8f01-24f2b164a1f8%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1B1_Zqkbwsp-%3Dk6Kf%3DDwU8fqpcuRqyHnxv%2BNN1m2r90g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchoWTKf7Mi5xKp58rLirkB6Y-hRY5s5oYy-XE_hcpPS0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Command to run script ?

2015-09-13 Thread yury nedelin
are  you trying to run mel script in python or just run it as it it in MEL ?
Yury

On Sun, Sep 13, 2015 at 11:32 PM, Christopher. 
wrote:

> I have a MEL Maya script called craOffsetKeys; I can't find how to run the
> script.  I've searched within the script can't find the correct command ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/aec6f9f3-9aeb-4995-93f1-48a1e2aa68a9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSciYQF-9fban9GzUwNwOZBGb7KF5f3%2BK4KzW_dksaU62yg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Layer Editor With PyQT

2015-09-08 Thread yury nedelin
All LayerEditor.Mel updates take place after Maya is restarted.
On Sep 8, 2015 10:15 AM, "Kurian O.S"  wrote:

> This works, but the issue is once if you source the layerEditor.mel then
> we won't get any update on the wrapped one :(
>
> On Tue, Sep 8, 2015 at 9:58 AM, Kurian O.S  wrote:
>
>> Perfect , thanks Jefri
>>
>> On Tue, Sep 8, 2015 at 7:14 AM, Jefri Yeh  wrote:
>>
>>> After abit of searching, it seems that Maya creates the layer editor by
>>> sourcing "layerEditor.mel" in the script directory, and the script can only
>>> create single instance of layerEditor called "DisplayLayerUITabLayout"
>>> (repeated sourcing  layerEditor.mel will fail). Thus if we use this unique
>>> name and convert it to qt widget, we can then embed it into our own widget.
>>> I've pasted the snippets here:
>>>
>>> https://gist.github.com/r4inm4ker/dfd7eb0ce2915d004367
>>>
>>> after that don't forget to source layerEditor.mel again to recreate the
>>> default layerEditor widget below channelBox...
>>>
>>>
>>> ---Jefri
>>>
>>>
>>>
>>> On Tue, Sep 8, 2015 at 1:08 AM, Kurian O.S  wrote:
>>>
 Hey Guys,

 Anyone got any luck to embed maya layer editor inside a pyqt dialog ?.
 i was able to embed some of the other ui items like panel's outliner etc..
 but layer editor I never got any idea. Anyone have any hints ?

 Thanks

 --
 --:: Kurian ::--

 --
 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.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/python_inside_maya/CANEMyhOmwjcxH5pa9_x3aqjY6eq8E0AVVms6XZ7ASPEkxbQRWg%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/CACdyi7qcbdjQmVsnxdOWmPWy7NgeTENXihYLeTUiYGrRe9QaYA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> --:: Kurian ::--
>>
>
>
>
> --
> --:: Kurian ::--
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CANEMyhME6oHEdNaBF4ezTwqMj%2BGr1i9FO%2BX%3D%3D_2ms9XzOpJu_w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScijR6T8%2BoRMnNA_ZfGnmejaa5b6WWe%3D5Et4-reaAWdzmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] In QListView , QStandardItemModel, QStandartItem statusTip does not show up in the status line

2015-06-17 Thread yury nedelin
Thanks guys,
Looks there is a nice solution, I will give it a try when I get into the
office this morning.
Yury


On Wed, Jun 17, 2015 at 12:23 AM, Anthony Tan 
wrote:

>  You and me both! I sort of glossed over it while I was testing, then
> decided to reimplement mousemove events just incase.. and then then penny
> dropped.
>
> Had to get up from the computer to avoid berating myself too obviously :D
>
>
> On Wed, Jun 17, 2015, at 05:02 PM, Justin Israel wrote:
>
> Wow, I feel dumb. That does work perfectly. I must have forgotten to
> enable mouse tracking when I initially tested it, and then enabled it later
> when I created the workaround :-)
>
> Nice call, Anthony.
>
> On Wed, Jun 17, 2015 at 6:41 PM Anthony Tan 
> wrote:
>
>
> Ha. I just went al the way into the event model and back out again,
> subclassing QMainWindow, QListView, etc etc and inspecting things trying to
> work out what was up...and then I noticed that stock QListView doesn't
> start off tracking mouse movements.
>
> *sigh*
>
> Two things.
>
> - First, just do a setMouseTracking(True) call on your QListView.
>
> - Second, when you say status line, I presume you mean the main window
> status line as in, the Maya master window? If so, this should work.
>
> If you're expecting it the QMainWindow's status bar, not so much. Works as
> expected in Nuke, but I haven't really hacked around much in Maya lately so
> can't shed much light on it there or how to easily patch into that. I may
> have a play this w/e if the rain keeps up..
>
>
>
>
> On Wed, Jun 17, 2015, at 07:39 AM, Justin Israel wrote:
>
> Good question. I wonder why that isn't working as expected. While it does
> store a status tip value that can be retrieved, it doesn't seem to
> propagate that. Maybe someone else knows an exact reason... but you could
> work around it if you really wanted a status tip to show. QListWidget has
> an explicit event for an itemEntered, and with QListView you would have to
> track it yourself:
>
>
> *from* PySide *import* QtCore, QtGui
> *class* ListView(QtGui.QListView): *def* __init__(self, *args, **kwargs):
> super(ListView, self).__init__(*args, **kwargs)
> self.__statusBar = *None* *def* mouseMoveEvent(self, e): *if* 
> self.__statusBar:
> idx = self.indexAt(e.pos())
> *if* idx.isValid():
> tip = idx.data(QtCore.Qt.StatusTipRole)
> self.__statusBar.showMessage(tip, 5*1000)
> *else*:
> self.__statusBar.clearMessage()
>
> *def* setStatusBar(self, bar): *''' Set a reference to a QStatusBar, for 
> messages '''*
> self.__statusBar = bar
> self.setMouseTracking(bool(bar))
> *# Usage*
> win = QtGui.QMainWindow()
> listW = ListView(win)
> listW.setStatusBar(win.statusBar())
> mod = QtGui.QStandardItemModel(listW)
> listW.setModel(mod)
>
> item = QtGui.QStandardItem(*"name"*)
> item.setToolTip(*"tooltip"*)
> item.setStatusTip(*"status tip"*)
> mod.appendRow(item)
>
> win.setCentralWidget(listW)
> win.show()
> win.raise_()
>
>
>  I actually do something a little bit similar to this, when I have my own
> random QStatusBar within a widget layout (not the main status bar) and I
> want to do custom status bar messages from child widgets.
>
> On Wed, Jun 17, 2015 at 7:22 AM ynedelin  wrote:
>
> hey guys,
> In QListView QStandartItem statusTip does not show up in the status line
>
> I am in maya 2015 using pyside
>
> I have a QListView with a QStandardItemModel with several appended rows of
> QStandardItem
>
> model = QtGui.QStandardItemModel.
> item = QtGui.QStandardItem(k)
> model.appendRow(item)
> item.setToolTip("this is tool tip")
> item.setStatusTip("this is status tip")
>
> tool tip shows up with the mouse hoovering over the item but the status
> line remains empty.
>
> Any ideas ?
>
> Thanks
> Yury
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/78bbbd46-fe77-41b7-84a9-8b3b9161e21a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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.
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2CsZLahEpTdj50kd5mL0STLn6-1FfXqSe79R-NsPguvw%40mail.gmail.com
> 

Re: [Maya-Python] invisible object

2014-10-28 Thread yury nedelin
You could assign shader with 100% transparency ...
yury

On Tue, Oct 28, 2014 at 7:19 PM, maya2015  wrote:

> Hello
>
>   first my English is not good... sorry.
> How to get the picture below?(by python api)
> 
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/97f96a51-3f0e-422a-8f48-76f2a5521d05%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScisUYsSzt_F0%3DXMy%3Dmp9yGQ6ck28hX56CB-OCLm3mNqLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Re: Open Discussion of Pymel by a Pymel noob

2014-07-07 Thread yury nedelin
GeordieJust curious, do many guys at ILM using it?

Yury



On Mon, Jul 7, 2014 at 9:41 AM, Geordie Martinez 
wrote:

> Getting back to Pymel. I love it. OOP is the way to go. the only way to
> go.
> I just hate that it has "mel" in the name.
>
> if and when there is ever a concerted effort by Autodesk to truly OOP
> their Maya python API I will adopt it.
> but in the meantime. Objects with methods makes more sense than flinging
> strings everywhere.
>
> 2 cents.
>
>
> On Mon, Jul 7, 2014 at 5:13 AM, Christopher Crouzet <
> christopher.crou...@gmail.com> wrote:
>
>> SideFX came up with Houdini Engine which is a similar idea but not as
>> complete I guess? Just throwing a prejudice here, not sure what I'm talking
>> about.
>> Anyways, I disagree when you say those companies would be against it.
>> Fabric can act like a glue between them all, potentially bringing more
>> customers to some of them, and definitely bringing more power to them all
>> with the crazy optimizations Fabric comes with.
>>
>> OT: not sure where you got that I'm inundated with work, I've ben
>> travelling for over 1 year :D
>>
>>
>>
>> On 7 July 2014 00:36, Jeremy YeoKhoo  wrote:
>>
>>> Ill try my best to look into FabricEngine, and get back to this Forum!
>>> Like Christopher, I am currently inundated with work, and Fabric is on my
>>> lower priority list. Also thanks for the info regarding Julia.
>>>
>>> From my current knowledge of FabricEngine and Maya, current version of
>>> Maya have a few internal issues with the API that is causing a few bugs to
>>> prop up. Additionally I wouldnt be surprised that Autodesk, Foundry, SideFX
>>> and etc are probably against the idea of a middleware platform. So I might
>>> just wait a bit.
>>>
>>>
>>>
>>> On Friday, 4 July 2014 12:06:52 UTC+10, Jeremy YeoKhoo wrote:
>>>
 Hey guys,

 I want to ask your personal opinion of pyMel. After reading the topic
 on Monkey Patching the Maya API
 
 by Christopher Crouzet and an earlier discussion regarding this topic in
 this forum
 
 , I started thinking back to pyMel and wondered if it might be an
 answer, I feel like kicking myself for disregarding PyMel previously. I
 have just realised how pythonic and how pyMel holds more of a object
 oriented paradigm as opposed to MEL and maya.cmds (even described by
 Autodesk
 )

 So I have a few queries, Pymel is now being shipped with Maya, but not
 supported by Autodesk which my have production implications.

 What do you guys think of Pymel?

 -Jeremy


  --
>>> 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.
>>>  To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/9de94ba1-2607-46d5-82ee-4bcad3fd6067%40googlegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Christopher Crouzet
>> *http://christophercrouzet.com* 
>>
>>   --
>> 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.
>>  To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CANuKW52_ij1KZ50ztmpazooR_9hJV34sphsAGSd9hULUNfa%3DWg%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CABPXW4geLsbG4%3DjGqMP6PHk%2Bk3g6GtK9SjRihq5oQ3Dc8F%2BTmw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this messa

Re: [Maya-Python] Re: Open Discussion of Pymel by a Pymel noob

2014-07-03 Thread yury nedelin
Pymel is object oriented.
And that's a great python feature that is missing in Maya.cmds . Hamish
makes a point about performance. It is true its slower then Mel but if you
really want speed go with api for few times speed is important. Do not
write a new ik solver with pymel but you probably will not write it in
.cmds ether. Pymel is here for you to make you get results faster. Not to
get your results run faster. You choose what you need for the job and use
what fits best. Pymel is great another tool in the toolbox and it ships
with Maya so they think its worthy.
On Jul 3, 2014 7:10 PM, "Jeremy YeoKhoo"  wrote:

> Just remember the post by Hamish MacKenzie. But this was a few years ago.
> Which put me off pyMel in the first place.
>
> MacaroniZoo 
>
>
> On Friday, 4 July 2014 12:06:52 UTC+10, Jeremy YeoKhoo wrote:
>>
>> Hey guys,
>>
>> I want to ask your personal opinion of pyMel. After reading the topic on 
>> Monkey
>> Patching the Maya API
>> 
>> by Christopher Crouzet and an earlier discussion regarding this topic in
>> this forum
>> 
>> , I started thinking back to pyMel and wondered if it might be an
>> answer, I feel like kicking myself for disregarding PyMel previously. I
>> have just realised how pythonic and how pyMel holds more of a object
>> oriented paradigm as opposed to MEL and maya.cmds (even described by
>> Autodesk
>> )
>>
>> So I have a few queries, Pymel is now being shipped with Maya, but not
>> supported by Autodesk which my have production implications.
>>
>> What do you guys think of Pymel?
>>
>> -Jeremy
>>
>>
>>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/451a3ffd-28b5-4bea-abd9-a555d8863aec%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScjNR8g_uvM0fEn%3D-aNgmJkvQ94RRgA8n8DXRqjidJHDFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] what's wrong with ikrpsolver?

2013-12-10 Thread yury nedelin
can you post a file with IK acting up ?
from the image it is hard to say what going on.
yury





On Tue, Dec 10, 2013 at 5:52 PM, seeks  wrote:

> hi,gus,  i found ikrpsolver make some mistake ,i do not konw how happend?
> Ikhandle can not control joint, any help?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/065ec0d2-0015-43ec-9b5d-3bd6e0fa6c2c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchq7JaxyZy2Ds0fKVCJ5oq%3DsTo3u6Qb%2BKqybKTt4-V7Zw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Maya-Python] rendering a locator based point cloud...

2013-12-08 Thread yury nedelin
do you need mesh cubes attached? that might get kind of slow. maybe you can
use particles instead.

yury
from android phone
On Dec 8, 2013 6:18 PM,  wrote:

> hey, i have a locator based point cloud in Maya and i'm trying to figure
> out a python script which would assign tiny cubes to each locator to make
> it renderable, any ideas? ...I know Maya fairly well, but i am struggling
> with getting my head around the python language!
>
> The cloud has around 10,000 locators
>
> thanks in advance :)
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/88c6f360-e905-4572-8963-3c8e15b9049c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchhCZS7dWmtnpi6huzCagsbcU100En7r4NiOkD_MG4v1g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Maya-Python] how to pass a list of floats to a scripted command?

2013-11-26 Thread yury nedelin
Thank you Justin,

it works great,





On Tue, Nov 26, 2013 at 2:45 AM, Justin Israel wrote:

> Something like this?
>
> def doIt(self, args):
> util = OpenMaya.MScriptUtil()
>
> name = args.asString(0)
>
> util.createFromInt(1)
> ptr = util.asUintPtr()
> weights = args.asDoubleArray(ptr)
>
> print "Name:", name, "; Weights:", weights
>
> cmds.myCommand("pCube1", [1.0, 2.2, 3.3])
> # Name: pCube1 ; Weights: [1.0, 2.2, 3.3]
>
>
> On Nov 26, 2013, at 2:41 PM, ynedelin wrote:
>
> hey guys
> how to pass a list of floats to a scripted command?
> first of all can it be done?
>
> Let say I want to have this
>
> myCommand(‘pCube1’, [list of skin weights])
>
>
> thank you
> yury
>
>
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/130d1de1-2a56-4efa-9b18-c8f49fb81572%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/2F990BEA-CCF9-4DDF-BF6E-37D56815225F%40gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSchFmYOMix%3D-3TRVfOrrs7_OYgcy%3Dgkycoci4B5MHBz1kw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Maya-Python] Re: getElements from MFnSingleIndexedComponent

2013-11-05 Thread yury nedelin
Thank you Paul

It works. Awesome!

yury






On Tue, Nov 5, 2013 at 7:20 AM, Paul Molodowitch  wrote:

> The relationship between MObjects + MFn function sets is one of the
> stranger features of the OpenMaya API, and can be hard to wrap your head
> around.  Basically, the mobject represents the actual "data", is is
> generally what is passed into / from the various methods, while the MFns
> can be thought of as classes used to "decode" the data, so that you can
> actually interact with them.  Therefore, before you can actually do
> anything with an MObject, you will often need to cast it into the
> appropriate MFn function set.
>
> In your case, since MFnSingleIndexedComponent.create returns an MObject,
> you need to then immediately turn around and cast that MObject into an 
> MFnSingleIndexedComponent
> object (or set an an existing MFnSingleIndexedComponent to point to it).
>
> Also, note that since the apiComponents arg to getWeights is an INPUT
> parameter, you will need to modify / set it BEFORE calling getWeights.
>
> - Paul
>
>
> On Mon, Nov 4, 2013 at 12:04 PM, ynedelin  wrote:
>
>> After keep looking into this I realized that my apiComponents is actually
>> a MObject, but how can I use it?
>>
>>
>>
>>
>> On Monday, November 4, 2013 11:27:14 AM UTC-8, ynedelin wrote:
>>>
>>> Hey guys
>>> I do not use OpenMaya very often so I need an advise here, I am writing
>>> a few functions to deal with skin weights and all works great as long as I
>>> do not change the components. I would like to change components for the
>>> setWeights.
>>>
>>> Right now I create the variables I need and then run the
>>> MFnSkinCluster.getWeights.
>>>
>>> So it looks sort of like this:
>>>
>>> apiComponents = om.MFnSingleIndexedComponent().create(om.MFn.
>>> kMeshVertComponent)
>>> skinCluster = omAnim.MFnSkinCluster(om.MObject())
>>>
>>> skinCluster.getWeights(
>>> skinPath,
>>> apiComponents,
>>> weights,
>>> *influenceCount*)
>>>
>>> Good!
>>>
>>> Now I would like to know what is inside the apiComponents, and hopefully
>>> change it. I assume this is MFnSingleIndexedComponent object, therefore I
>>> should be able to run something like
>>>
>>> vertexIndexList = om.MIntArray()
>>> apiComponents.getElements(vertexIndexList)
>>>
>>>
>>> But I get this error
>>> # self.apiComponents.getElements(vertexIndexList)
>>> #   File "c:\buildforge\Maya_2013_Win64\build\work\Release\
>>> runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 1529, in
>>> 
>>> #   File "c:\buildforge\Maya_2013_Win64\build\work\Release\
>>> runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 54, in
>>> _swig_getattr
>>> # AttributeError: getElements #
>>>
>>> please shed some light on how this supposed to work .
>>>
>>> thank you
>>>
>>> Yury
>>>
>>>
>>>
>>>
>>>  --
>> 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.
>>  To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/43a71323-8b5d-4e81-b457-c19cff26fc08%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAAssL7Z2UT3_8hwhX4A872AocO%2BMCoCbn-oCpRqwq0UJ7pd2Xw%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGSch%2BBxAZtkSANV6Sy1Ayxvf5QRSGDsuWQAYAV38tN0k_qA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Maya-Python] maya layer color number to RGB?

2013-10-10 Thread yury nedelin
ahh here it is

colorIndex -q 1

thank you




On Thu, Oct 10, 2013 at 3:47 PM, ynedelin  wrote:

> hey guys is there an easy way to tell RGB values of a preset maya color
> for example from an color override option?
> Let say color override 17 , what's the RGB?
>
> Thanks
> Yury
>
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/13766d45-b385-4b82-ab48-06d35774af41%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CACqGScgLcAE5ewdMfnC_cz%2BUcvk2uqGGUXMK57ztbCPKpW88iA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Maya-Python] passing flags as kwargs

2013-05-29 Thread yury nedelin
Thanks guys,
I did not realize you can just pass **kwargs to the commands, much neater.
I am iterating in this case because not all **kwargs are applicable to the
frameLayout but it is a very nice way to pass flags.

Yury





On Wed, May 29, 2013 at 12:21 PM, Ed Caspersen wrote:

> Iterating on items() doesn't seem to be needed unless you are trying to
> trap each possible keyword argument that may be passed. This works as well:
>
> import maya.cmds as mc
>
> win = mc.window()
>
> def frame(**kwargs):
> frame_layout = mc.frameLayout()
> mc.frameLayout(frame_layout, edit=1, **kwargs)
>
> frame(label='foo', borderStyle='etchedIn')
> frame(label='bar', borderStyle='etchedIn')
> frame(label='zed', borderStyle='etchedOut')
>
> mc.showWindow(win)
>
>
> Ed Caspersen
>
>
> On Wed, May 29, 2013 at 12:10 PM, Adam Mechtley 
> wrote:
>
>> You can actually pack your keyword args into a dictionary and pass it
>> into the command like:
>>
>> kw = {flag: value}
>> mc.frameLayout(self.frame, **kw)
>>
>>
>> On Wed, May 29, 2013 at 2:06 PM, ynedelin  wrote:
>>
>>> hey guys
>>> I have this piece of code working fine, but us there a nicer way to do
>>> this without pre-building the string for eval?
>>>
>>> def frame(self, **kwargs):
>>>   self.frame = mc.frameLayout()
>>> for flag, value in kwargs.iteritems():
>>>   try:
>>> if type(value) is int or type(value) is float:
>>>   cmd = "mc.frameLayout('%s', edit=1, %s=%f)"%(self.frame, flag,
>>> value)
>>> elif type(value) is str:
>>>   cmd = "mc.frameLayout('%s', edit=1, %s='%s')"%(self.frame,
>>> flag, value)
>>> eval(cmd)
>>>except:
>>>  traceback.print_exc()
>>>
>>> Yury
>>>
>>>
>>> --
>>> 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.
>>> To post to this group, send email to python_inside_maya@googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>  --
>> 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.
>> To post to this group, send email to python_inside_maya@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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.
> To post to this group, send email to python_inside_maya@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Maya-Python] rig performance

2013-04-28 Thread yury nedelin
Ravi, access to more  documentation would great.  Where can I see it?
Yury
On Apr 28, 2013 4:02 PM, "Ravi Jagannadhan"  wrote:

> Just following up on this. I took this discussion offline with Aevar, and
> sent him some documentation (which should now be a part of Maya 2014's
> documentation) and some lecture videos. If anyone else is interested,
> please ping me and I'll provide them.
>
> Thank you for your time
> Ravi
>
>
> On Sun, Apr 28, 2013 at 3:21 PM, Ævar Guðmundsson <
> aevar.gudmunds...@gmail.com> wrote:
>
>> Hi there right back Ravi, absolute pleasure
>>
>>   Appriciate you coming back so soon.
>>
>>   To start with I guess all I'm after is information regarding how to
>> read information generated by the DG profiler in my script editor so I can
>> start playing with it and get a feel for how the data is represented.  You
>> mention you wrote a MEL and DG profiler, could you perhaps point me towards
>> any information regarding the MEL one if no python hooks have been
>> implemented?
>>
>> --
>> 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.
>> To post to this group, send email to python_inside_maya@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> --
> Where we have strong emotions, we're liable to fool ourselves - Carl Sagan
>
> --
> 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.
> To post to this group, send email to python_inside_maya@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Maya-Python] Creating Skeleton with knowledge of joint Pos. and Rot.

2013-04-11 Thread Yury Nedelin
Is your data for world space per joint or local space?

Do you know what this skeleton looks like in the default position?

Also I am confused by the last sentence, you want to rotate the joint to 40,0,0 
but keep its position at 0,0,0?

Yury

On Apr 11, 2013, at 8:12 PM, Mat  wrote:

> I made a topic at cgsociety under rigging, but Im thinking some people here 
> would have a programming way to do it. 
> 
> Im not that familiar with the api in python, just the command reference so 
> excuse me if this is obvious to someone.  
> 
> Basically I have some mocap data and I need to create a skeleton based off of 
> this data.  The only information i can get is a text file with a joint name, 
> xyz position, axis, and rotation value.  The problem is none of the rotations 
> are 0,0,0, so when i create the joints and move them to location, they have 0 
> rotations.  I tried using the cmds.joint() and rotating the joint to the 
> proper position before hand, but first, i get warning that says skipping 
> joint it has non-zero rotations, and secondly the orientation axis does not 
> align with the joint anymore.  
> 
> Ideally, is there some way, once i have a skeleton with all of the joints in 
> the correct position and correct axis, to tell the joint, currently your 
> rotation is 40,0,0 ... but I dont want the joint to move just update that its 
> current position is actually not ,0,0,0.
> 
> Any thoughts on how to do it?
> 
> Thanks! 
> 
> -- 
> 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.
> To post to this group, send email to python_inside_maya@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
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.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Maya-Python] node creation time

2012-06-29 Thread yury nedelin
Thanks guys
Looks like Maya stores the edit list and filter looks it up.
Using a function wrapper to track all node edits and add the data to them
could work but it seem a bit heavy handed.

Yury


On Fri, Jun 29, 2012 at 3:58 AM, cedric bazillou
wrote:

> If you are interested by this function you could  use the API to detect
> when object are created( more precisely when they are added to the graph )
> and then add ( if the attribute is not here) a string attribute with the
> creation time . On macaronikazoo you can find a piece a code to extend :
> http://www.macaronikazoo.com/?p=730
>
> Le vendredi 29 juin 2012 03:45:04 UTC+2, Justin Israel a écrit :
>
>> I don't see where they store the timestamps for nodes within the API, but
>> looking at what the HyperShade is doing, it is running an lsThroughFilter()
>> command. You could use this same approach, using the current selection:
>>
>> # first select some nodes
>>
>> # then create a pass through filter that basically does nothing
>> objFilter = cmds.createNode("objectFilter"**)
>> sorted_nodes = cmds.lsThroughFilter(**objFilter, na=True, sort="byTime",
>> sl=True)
>>
>>
>>
>> On Jun 28, 2012, at 11:26 AM, ynedelin wrote:
>>
>> hey Guys
>>
>> I just noticed that in Hypershade i can sort nodes by time
>>
>> Does that mean Maya stores the creation time stamp per node somewhere?
>>
>> That would be useful.
>>
>> yury
>>
>> --
>> view archives: 
>> http://groups.google.com/**group/python_inside_maya
>> change your subscription settings: http://groups.google.com/**
>> group/python_inside_maya/**subscribe
>>
>>
>>  --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] how to inherit transform class fropm pymel

2012-06-21 Thread yury nedelin
Thanks Paul
I will look at these today
Yury



On Wed, Jun 20, 2012 at 7:09 PM, Paul Molodowitch wrote:

> Hi Yury - what you're looking for is pymel "virtual classes" - there's an
> example here:
>
> https://raw.github.com/LumaPictures/pymel/master/examples/customClasses.py
>
> Or, Jason Parks has kindly written up a nice little tutorial:
>
> http://www.jason-parks.com/artoftech/?p=225
>
> Let me know if there's anything you have questions about!
>
>  - paul
>
>
> On Wed, Jun 20, 2012 at 3:30 PM, ynedelin  wrote:
>
>> hey Guys
>> I think I am totally thinking wrong about this, please explain.
>>
>> so I would like to inherit the nt.Transform and i am not sure how to do
>> it.
>>
>> for example can I do this?
>>
>> *import pymel.core as pm
>> class MyTrans(pm.nt.Transform):
>>t = "test"
>>
>> n = MyTrans("pCube1")
>> #does not work
>> *
>> I am trying to do this:
>> Let say I have a rig control and it is a Maya transform but it also has a
>> bunch of my rig specific info on it like custom attributes.
>> I would like to make a class for this control that could be used to
>> quickly get info about it or perform different functions on it.
>>
>> so i can do thinks like
>>
>> *n = MyTrans("ctrl1")
>> n.getRotation() #from nt.Transform
>> and
>> n.getBodypart() #added by me
>>
>> thanks
>> Yury
>>
>>
>>
>> *
>>
>>
>>  --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>  --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Selectively export child members?

2012-04-25 Thread yury nedelin
You can unparent body, export control with head, then reparent body and
unparent head and export again.

On Apr 25, 2012 1:03 AM, "Panupat Chongstitwattana" 
wrote:

Is it possible to select a parent with multiple child, and then have Python
export the parent with each separate child into separate files?

For example,

Controller is the parent. it has 2 child nodes
- head
- body

I want to select the Controller, then export
- controller+head
- controller+body

Thanks

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] logging and maya script editor

2011-12-06 Thread yury nedelin
Thanks Justin

well my true issue is accumulation of log info every time I reload the
script.
I realize that I might have a totally wrong way of doing this but,

let say I have this script called myScript.py

#===
import logging
logger = logging.getLogger('simple_example')
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)

# create formatter
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s -
%(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)

# prevent logging from bubbling up to maya's logger
logger.propagate=0

def testLog():

# 'application' code
logger.debug('debug message')
logger.info('info message')
logger.warn('warn message')
logger.error('error message')
logger.critical('critical message')
#=

now if I

import myScript
myScript.testLog()

I get a nice print out.
However if I make a change to the script and reload

reload(myScript)
myScript.testLog()

my print out is old info and new info, so its adding to the log,

how can I clear the log every time I reload?


>Could you explain your actual goal? Are you trying to modify maya's
existing logger or just create your >own for custom logging?

I was not trying to modify Maya's existing logger, I was just trying to use
python logging module to see if its something I could use for my work.
However how can I access Maya's existing Logger, that sounds interesting?


If I have something simple

import logging
logging.basicConfig()
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)

def testLog():
log.debug("this is debugging")

then I get the info printed out once but when I try to add the the
formatting, log accumulates the info.

Thanks
Yury



On Tue, Dec 6, 2011 at 7:05 PM, Justin Israel wrote:

> Hi there,
>
> I believe the problem you are experiencing is that you are conflicting
> with maya's own logger. The python docs for logging explain that
> logging.basicConfig() should only be called in the main thread and before
> any other threads are started.
>
> What you might want to try is this example from the Basic Tutorial section:
> http://docs.python.org/howto/logging.html#logging-basic-tutorial
>
> But with a small modification:
>
> #===
>
> import logging
>
>
> logger = logging.getLogger('simple_example')
>
> logger.setLevel(logging.DEBUG)
>
>
> ch = logging.StreamHandler()
>
> ch.setLevel(logging.DEBUG)
>
>
> # create formatter
>
> formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s -
> %(message)s')
>
> ch.setFormatter(formatter)
>
> logger.addHandler(ch)
>
>
> # prevent logging from bubbling up to maya's logger
>
> logger.propagate=0
>
>
> # 'application' code
>
> logger.debug('debug message')
>
> logger.info('info message')
>
> logger.warn('warn message')
>
> logger.error('error message')
>
> logger.critical('critical message')
>
>
> #===
>
> Could you explain your actual goal? Are you trying to modify maya's
> existing logger or just create your own for custom logging?
>
>
>
> On Tue, Dec 6, 2011 at 5:48 PM, ynedelin  wrote:
>
>> I got this from the python docs page
>>
>> if I run this in the script editor:
>>
>> import logging
>> logging.basicConfig(format='%(asctime)s %(message)s')
>> logging.warning('is when this event was logged.')
>>
>> I get this:
>>
>> # Warning: root : is when this event was logged. #
>>
>> How can I get the date to show in the script editor?
>>
>> 2010-12-12 11:41:42,612 is when this event was logged.
>>
>> Yury
>>
>> --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>  --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Re: Slightly OT: maya 2012: Ligth linker problems still there?

2011-12-02 Thread yury nedelin
We have experienced these problems all the time in the past so we start
running light linker clean up scripts on file open. We are in 2012 now and
we are still running the script.
Yury


On Fri, Dec 2, 2011 at 12:16 PM, 54N105  wrote:

> Hi Katisss,
>
> I use Maya 2012 but I am not familiar with this light linking issue.
> However, I wanted to let you know that Autodesk has released Service
> Pack 1 which includes the latest fixes. You can find it here:
>
>
> http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=17847744&linkID=9242259
>
> I haven't gone through them but the release notes might give you
> information on the fixes.
>
> On Dec 1, 6:52 pm, katisss  wrote:
> > hi,
> > i was wondering if somebody is using maya 2012
> > and has experience if the Ligth linker problems (lots of connections,
> > scene slowdown) is still there? It is hard to reproduce so would be
> > good to know.
> >
> > It creates lots of connections to light linker node (common with
> > referenced scenes) and causes scene slowdown for opening and saving.
> > Spreads when imported to other scenes.
> > Anybody happes to  have an old "infected" scene  i can use to test
> > they can send me or upload?
> > Thanks
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Re: Which editor do you use?

2011-10-26 Thread yury nedelin
Nice
thanks jan

Yury

On Tue, Oct 25, 2011 at 1:13 PM, Jan:  wrote:

> Hi Yury,
>
> I do not think there is mel syntax available for VS 2010 but here is an
> explanation for pymel.
> https://pytools.codeplex.com/discussions/276754
>
> If it does not work give VS 2010 a restart. that should do the trick.
>
> Hope that helps!
> Jan
>
>
> 2011/10/25 ynedelin 
>
>>
>> Hi Mike
>>
>> I am staring to use VS as well I am on VS 2010. Do you know of a way
>> to get MEL syntax for VS?
>>
>> thanks
>>
>> Yury
>>
>>
>> On Oct 21, 5:27 am, "Mike Malinowski (LIONHEAD)"
>>  wrote:
>> > As with Jan, I also use Visual Studio with the PTVS integration.
>> Generally I find it much cleaner and organised than eclipse.
>> >
>> > From: python_inside_maya@googlegroups.com [mailto:
>> python_inside_maya@googlegroups.com] On Behalf Of Jan:
>> > Sent: 21 October 2011 13:05
>> > To: python_inside_maya@googlegroups.com
>> > Subject: Re: [Maya-Python] Re: Which editor do you use?
>> >
>> > I just started to use visual studio with the python implementation that
>> has been released recently.
>> > I must say its quite good. Just need to get the hang of using visual
>> studio.
>> >
>> > Before that Eclipse/Pydev which worked really well.
>> >
>> > 2011/10/6 PixelMuncher > pixeldr...@gmail.com>>
>> > I'll put in my 2 cents for Eclipse/Pydev.  Works great for me.
>> > I have the creative crash plugin working as far as communicating w/
>> > Maya, but I don't think autocomplete will work with straight Python
>> > (ie cmds.command...).
>> >
>> > --
>> > view archives:http://groups.google.com/group/python_inside_maya
>> > change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>> >
>> > --
>> > view archives:http://groups.google.com/group/python_inside_maya
>> > change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>> --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>  --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] xform at a particular frame/time

2011-09-09 Thread yury nedelin
Thanks Judd
I did not realize I could get global matrix from the transform directly with
getAttr. I will try it when I get in front of Maya. Right now total
currentTime calls take over 50% of the time.
Yury

On Fri, Sep 9, 2011 at 7:37 PM,  wrote:

> Hey man,
>
> You can actually query the matrix attribute with getAttr -t...or if you dig
> into open maya there is a MDGContext you can use with an MPlug on the
> getValue() call...just keep in mind if you're evaluating multiple controls
> it might be quicker to walk the timeline and let everything evaluate at once
> and then query values, instead of re-evaluating the dg on each getAttr call.
> --Original Message--
> From: ynedelin
> Sender: python_inside_maya@googlegroups.com
> To: python_inside_maya
> ReplyTo: python_inside_maya@googlegroups.com
> Subject: [Maya-Python] xform at a particular frame/time
> Sent: Sep 10, 2011 2:57 AM
>
> hey all
>
>
> do you guys know if it's possible to get global matrix at a given time
> without having to set current time
>
> 'getAttr' has a 'time' flag, can similar thing be done with xform?
>
>
> thanks
>
> Yury
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
> Sent via my BlackBerry from Vodacom - let your email find you!
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Getting useful tracebacks in Maya

2011-08-08 Thread yury nedelin
thanks guys
this is great insight into using exceptions. new concept for all that
used to Mel.




On Mon, Aug 8, 2011 at 11:41 AM, Chad Dombrova  wrote:
>>
>> Thanks for pointing that out as well. I wanted to demonstrate a more
>> explicit approach because on a pipeline artists probably would not have that
>> option turned on which means they normally email the default error which is
>> quite useless at times.
>
> the traceback module can indeed be very useful.
> btw, if your pipe has a userSetup.py that everyone executes, you could add
> the line:
>
> pm.cmdScrollFieldReporter(pm.melGlobals['gCommandReporter'], edit=True,
> stackTrace=True)
>
> -chad
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Which editor do you use?

2011-07-10 Thread yury nedelin
I use Komodo from active state.

its very well suited for python and they have mel add-on

yury


On Sun, Jul 10, 2011 at 8:45 AM, John Patrick  wrote:
> eclipse with pydev and emacs+ here; I used to just use emacs with no
> completion, before I knew the emacs+ plugin existed.  For version control I
> use git/github; I'm no expert on it, but the basics are easy enough to pick
> up to be very useful after a day's worth of reading about it.
>
> On Sun, Jul 10, 2011 at 7:35 AM, paul jordan  wrote:
>>
>> hi
>>
>> I was expecting a tivail install for eclipse and pydev--but it turned into
>> a production as the
>> you tuve vids were pretty inaccurate. a bad omen
>>
>>
>>
>> paul
>>
>> --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>
>
>
> --
> John Patrick
> 404-242-2675
> jspatr...@gmail.com
> http://www.canyourigit.com
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] two object ,how to be controled each other?

2011-07-08 Thread yury nedelin
This will require a cyclic relationship which Maya does not like.

But you could hack it with a script job by running a script on
selection that will switch the influence and if you are planning on
setting keys also update the existing keys on the current target.

In general I would avoid this sort of thing.

What are you trying to use this for?

Yury


On Fri, Jul 8, 2011 at 3:54 AM, rais  wrote:
> two object ,how to be controled each other,moving a-obj then b-obj moved
> same deviant..
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Re: focus camera scriptjob

2011-06-30 Thread yury nedelin
Maybe you can do something with the distance node, so you can avoid
having the script job at all.

It would be faster and i think work better as well.

Yury


On Thu, Jun 30, 2011 at 6:12 AM, Tim  wrote:
> This is hardcoded to set the persp camera, but is it the effect you're
> looking for?
>
> global proc setCameraTumblePivot()
> {
>    string $sel[] = `ls -sl`;
>    if (0 == `size $sel`)
>        return;
>
>    float $bbox[] = `xform -q -ws -boundingBox $sel`;
>    float $cp[];
>    $cp[2] = $bbox[2] + 0.5*($bbox[5] - $bbox[2]);
>    $cp[1] = $bbox[1] + 0.5*($bbox[4] - $bbox[1]);
>    $cp[0] = $bbox[0] + 0.5*($bbox[3] - $bbox[0]);
>
>    setAttr perspShape.tumblePivot $cp[0] $cp[1] $cp[2];
>
>    tumbleCtx -e -localTumble 0 tumbleContext;
> }
> scriptJob -e "SelectionChanged" "setCameraTumblePivot";
>
> I think it's the combination of setting the camera's tumble pivot, and
> telling the tumbleCtx to use that pivot (-localTumble 0)
> that you want?
>
>
> On Jun 30, 2:49 am, Sebastian Schoellhammer
>  wrote:
>> Hello!
>>
>> I would love to get the focus point of the camera to stay on the selection
>> so that I can avoid hitting "f" all the time during modeling..
>> (like "local focus" in mudbox, zbrush or 3dsmax)
>>
>> I tried doing it on a scriptjob with MFnCamera::centerOfInterestPoint (I
>> tried the mel version too)
>> but both seem to move the position of the camera as well - or there is a pop
>> anyway which is annoying.
>>
>> Has anybody seen/made a script like this?
>>
>> Thanks!!
>> seb
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: 
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe


Re: [Maya-Python] Re: unlocking referenced nodes

2010-05-17 Thread yury nedelin
yes that's exactly what I am doing this for, animation layers.

yury



On Mon, May 17, 2010 at 3:09 PM, Ofer Koren  wrote:

> Animation Layers might be useful here as well.
>
> - Ofer
> www.mrbroken.com
>
>
> On Mon, May 17, 2010 at 3:02 PM, yury nedelin  wrote:
>
>> I wanted to shift the time of the animcurve and I acctualy found a way to
>> do it , not too pretty  but it works ,
>>
>> I connect the time1 node to the referenced animcurve input attribute and
>> add addDoubleLinear between the time1 plug and the animcurve and use it as
>> the time-offset.
>>
>> yury
>>
>>
>>
>> On Mon, May 17, 2010 at 2:39 PM, yury nedelin  wrote:
>>
>>> thanks a lot for the tip
>>>
>>> I will look into these scripts.
>>>
>>> yury
>>>
>>>
>>>
>>>
>>> On Mon, May 17, 2010 at 12:51 PM, Mark Jackson wrote:
>>>
>>>> Actually there is a mel global that can over ride the default locking
>>>> on a node type/attr basis. I've never run it but remember reading
>>>> about it when we first looked into a referenced pipeline.
>>>>
>>>> getLockReferenceExcludedNodeTypes()
>>>> getLockReferenceExcludeAttributes()
>>>>
>>>> theres a chunk in the manuals that go over it. Not sure if that's what
>>>> you're after or not
>>>>
>>>> Mark
>>>>
>>>> On 17 May 2010 21:35, Mark Jackson  wrote:
>>>> > animCurves are locked during referencing full stop, I don't think
>>>> > there's any way to unlock or edit them afterwards. It's a pain as one
>>>> > of the things I often found is that you may want to reference in a
>>>> > sequence, but shift the curve times round to suit. As far as I know
>>>> > there's no way to over-ride this.
>>>> >
>>>> >
>>>> >
>>>> > On 17 May 2010 20:06:00 UTC+1, Judah Baron 
>>>> wrote:
>>>> >> You can't just unlock a node that was locked in a referenced file.
>>>> Depending on what you want to do, there may be other ways of accessing the
>>>> node. Can you describe your use case a little?
>>>> >>
>>>> >> -Judah
>>>> >>
>>>> >>
>>>> >> On Mon, May 17, 2010 at 11:13 AM, Brandon Harris <
>>>> bhar...@irrigger.com> wrote:
>>>> >>>
>>>> >>> isn't it like
>>>> >>>
>>>> >>> import maya.cmds as cmds
>>>> >>>
>>>> >>> cmds.lockNode(nodeName, lock=False)
>>>> >>>
>>>> >>> Brandon L. Harris
>>>> >>>
>>>> >>> On May 17, 12:53 pm, ynedelin  wrote:
>>>> >>> > hey all
>>>> >>> >
>>>> >>> > does anyone know of a way to unlock a referenced node?
>>>> >>> >
>>>> >>> > in particular an animcurve node?
>>>> >>> >
>>>> >>> > yury
>>>> >>> >
>>>> >>> > --http://groups.google.com/group/python_inside_maya
>>>> >>>
>>>> >>> --
>>>> >>> http://groups.google.com/group/python_inside_maya
>>>> >>
>>>> >> --
>>>> >> http://groups.google.com/group/python_inside_maya
>>>> >
>>>>
>>>> --
>>>> http://groups.google.com/group/python_inside_maya
>>>>
>>>
>>>
>>  --
>> http://groups.google.com/group/python_inside_maya
>>
>
>  --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Re: [Maya-Python] Re: unlocking referenced nodes

2010-05-17 Thread yury nedelin
I wanted to shift the time of the animcurve and I acctualy found a way to do
it , not too pretty  but it works ,

I connect the time1 node to the referenced animcurve input attribute and add
addDoubleLinear between the time1 plug and the animcurve and use it as the
time-offset.

yury



On Mon, May 17, 2010 at 2:39 PM, yury nedelin  wrote:

> thanks a lot for the tip
>
> I will look into these scripts.
>
> yury
>
>
>
>
> On Mon, May 17, 2010 at 12:51 PM, Mark Jackson  wrote:
>
>> Actually there is a mel global that can over ride the default locking
>> on a node type/attr basis. I've never run it but remember reading
>> about it when we first looked into a referenced pipeline.
>>
>> getLockReferenceExcludedNodeTypes()
>> getLockReferenceExcludeAttributes()
>>
>> theres a chunk in the manuals that go over it. Not sure if that's what
>> you're after or not
>>
>> Mark
>>
>> On 17 May 2010 21:35, Mark Jackson  wrote:
>> > animCurves are locked during referencing full stop, I don't think
>> > there's any way to unlock or edit them afterwards. It's a pain as one
>> > of the things I often found is that you may want to reference in a
>> > sequence, but shift the curve times round to suit. As far as I know
>> > there's no way to over-ride this.
>> >
>> >
>> >
>> > On 17 May 2010 20:06:00 UTC+1, Judah Baron 
>> wrote:
>> >> You can't just unlock a node that was locked in a referenced file.
>> Depending on what you want to do, there may be other ways of accessing the
>> node. Can you describe your use case a little?
>> >>
>> >> -Judah
>> >>
>> >>
>> >> On Mon, May 17, 2010 at 11:13 AM, Brandon Harris 
>> wrote:
>> >>>
>> >>> isn't it like
>> >>>
>> >>> import maya.cmds as cmds
>> >>>
>> >>> cmds.lockNode(nodeName, lock=False)
>> >>>
>> >>> Brandon L. Harris
>> >>>
>> >>> On May 17, 12:53 pm, ynedelin  wrote:
>> >>> > hey all
>> >>> >
>> >>> > does anyone know of a way to unlock a referenced node?
>> >>> >
>> >>> > in particular an animcurve node?
>> >>> >
>> >>> > yury
>> >>> >
>> >>> > --http://groups.google.com/group/python_inside_maya
>> >>>
>> >>> --
>> >>> http://groups.google.com/group/python_inside_maya
>> >>
>> >> --
>> >> http://groups.google.com/group/python_inside_maya
>> >
>>
>> --
>> http://groups.google.com/group/python_inside_maya
>>
>
>

-- 
http://groups.google.com/group/python_inside_maya

Re: [Maya-Python] Re: unlocking referenced nodes

2010-05-17 Thread yury nedelin
thanks a lot for the tip

I will look into these scripts.

yury



On Mon, May 17, 2010 at 12:51 PM, Mark Jackson  wrote:

> Actually there is a mel global that can over ride the default locking
> on a node type/attr basis. I've never run it but remember reading
> about it when we first looked into a referenced pipeline.
>
> getLockReferenceExcludedNodeTypes()
> getLockReferenceExcludeAttributes()
>
> theres a chunk in the manuals that go over it. Not sure if that's what
> you're after or not
>
> Mark
>
> On 17 May 2010 21:35, Mark Jackson  wrote:
> > animCurves are locked during referencing full stop, I don't think
> > there's any way to unlock or edit them afterwards. It's a pain as one
> > of the things I often found is that you may want to reference in a
> > sequence, but shift the curve times round to suit. As far as I know
> > there's no way to over-ride this.
> >
> >
> >
> > On 17 May 2010 20:06:00 UTC+1, Judah Baron 
> wrote:
> >> You can't just unlock a node that was locked in a referenced file.
> Depending on what you want to do, there may be other ways of accessing the
> node. Can you describe your use case a little?
> >>
> >> -Judah
> >>
> >>
> >> On Mon, May 17, 2010 at 11:13 AM, Brandon Harris 
> wrote:
> >>>
> >>> isn't it like
> >>>
> >>> import maya.cmds as cmds
> >>>
> >>> cmds.lockNode(nodeName, lock=False)
> >>>
> >>> Brandon L. Harris
> >>>
> >>> On May 17, 12:53 pm, ynedelin  wrote:
> >>> > hey all
> >>> >
> >>> > does anyone know of a way to unlock a referenced node?
> >>> >
> >>> > in particular an animcurve node?
> >>> >
> >>> > yury
> >>> >
> >>> > --http://groups.google.com/group/python_inside_maya
> >>>
> >>> --
> >>> http://groups.google.com/group/python_inside_maya
> >>
> >> --
> >> http://groups.google.com/group/python_inside_maya
> >
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Re: [Maya-Python] Re: PyMEL included with Maya 2011

2010-03-10 Thread yury nedelin
wow congrats, this is very cool.

yury



On Wed, Mar 10, 2010 at 11:10 PM, Chad Dombrova  wrote:

>
> > Does that mean in future you just have to do a plain:
> > from pymel.all import *
> > and it will be there without actually installing anything ?
> > Or will it be loaded by default ?
>
> just like maya.cmds, you'll have to import it to use it, but it will be
> installed by default in maya's site-packages directory.
>
> -chad
>
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Re: [Maya-Python] Re: PyMEL included with Maya 2011

2010-03-10 Thread yury nedelin
is that a fact?
yury



On Wed, Mar 10, 2010 at 9:19 PM, Drake  wrote:

> Congratulations on such a great news!!
>
> - Drake
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

[Maya-Python] Re: userSetup.py location

2009-08-07 Thread yury nedelin
we have local userSetup run a global userSetupAll

This way we can have local functions run together with functions that are
global for every one.

yury




On Fri, Aug 7, 2009 at 7:44 AM, sberger  wrote:

>
> Hi, I have this setup for Maya 2009
>
> My user Pref are localed on the network m:\profiles\sylvain.berger\maya
> \...
> in these user pref I have a maya.env file that add a network
> MAYA_SCRIPT_PATH=m:\library\maya\scripts\
>
> when I put the userSetup.py in the MAYA_SCRIPT_PATH location it
> doesn't get executed,
> it only runs when it is in the scripts folder of my maya pref folder
>
> I also have a PYTHONPATH in my maya.env file, and puting the
> userSetup.py file there doesn't work as well.
>
> It only runs when it is in my pref folder.
>
> did anyone know how to get the userSetup.py to work outside the pref
> folder?  I would like to have a userSetup.py global to all user...  I
> think I could revert to using a userSetup.mel and call my userSetup.py
> from the mel file... but it is not clean and I hate things that are
> messy :)
>
> Thanks
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: python plugin information

2009-07-24 Thread yury nedelin
thanks Marcin

that worked

yury


On Fri, Jul 24, 2009 at 2:54 PM, marcin  wrote:

>
> >
> > I wrote my first useful plugin in python, now I would like to add
> > plugin Version and Vendor to the plugin information in maya UI.
> >
> > How can i do that?
> >
> You add version and vendor information in initializePlugin method
>
>mplugin = OpenMayaMPx.MFnPlugin(mobject, "Vendor","Version",
> "RequiredApiVersion")
>
>
> Marcin
>
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: Equivalent to catch in python

2009-05-18 Thread yury nedelin
thanks a lot.

that's what i needed

yury


On Mon, May 18, 2009 at 8:56 AM, frostfyre  wrote:

> try:myfunc()
> except:
> pass
>
> will provide the same "fire and forget" functionality as catch(`myFunc()`);
> would in MEL. You can also catch specific exception types to do advanced
> error handling from here.
>
> try:myfunc(some_arg)
> except TypeError:
> print "myFunc() requires argument of type foo.\n myFunc() failed."
> pass
>
> In this example, the user is notified that the function failed, and given
> the reason, while still allowing whatever called that function to continue.
>
> Hope this helps
>
> -Paul
>
>
>
> On Mon, May 18, 2009 at 8:22 AM, ynedelin  wrote:
>
>>
>> what is a way to catch error when in python similar to MEL?
>>
>> thanks
>> Yury
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: list all skinned points to a joint

2009-03-18 Thread yury nedelin
yeah that's nice

pymel ...

I should meet with you guys on Sunday

Yury



On Wed, Mar 18, 2009 at 12:00 PM, IanJones  wrote:

>
> Alternative in pymel via api:
>
> from pymel import *
>
> skin = PyNode('skinCluster1')
> influnces = skin.getInfluence(q=True)
> vert_list, values = skin.getPointsAffectedByInfluence(influnces[0])
> vert_list = vert_list.getSelectionStrings()
>
> index = 0
> for vtxs in vert_list:
> vtxs = PyNode(vtxs)
>for vert in vtxs:
>print vert, values[index]
>index += 1
>
> bodyShape.vtx[961] 0.5
> bodyShape.vtx[962] 0.5
> bodyShape.vtx[1459] 0.5
> bodyShape.vtx[1460] 0.5
> bodyShape.vtx[1477] 0.016
> bodyShape.vtx[1484] 0.036
> bodyShape.vtx[1833] 0.016
> bodyShape.vtx[1880] 0.015
> bodyShape.vtx[1900] 0.5
>
> On Mar 18, 12:53 am, "sim.On"  wrote:
> > wow chadrik ,
> >
> > that loooks super-easy . great work !!!
> >
> > sim.On
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: list all skinned points to a joint

2009-03-18 Thread yury nedelin
Thanks guys, I will play with it tomorrow morning.

Pymel looks nice.

Yury


On Tue, Mar 17, 2009 at 11:00 PM, Chadrik  wrote:

>
>
> as a demo of the new pymel, i rewrote this api snippet using pymel.
>
> here's the full file with both the api and pymel versions:
> http://pastebin.com/m63084e53
>
> as you can probably tell it's using many of the same methods as the
> API, but wrapped up so you don't have to deal with all the extra API
> syntax, like MScriptUtil and passing by reference.
>
> here's just the pymel part:
>
>
> #---
>
> from pymel import *
>
> skin = 'skinCluster1'
> skinClusterNode = SkinCluster(skin)
> jointNames = skinClusterNode.influenceObjects()
>
> # get dagPath for the skinCluster at index 0
>
> index = 0
> pathIndex = skinClusterNode.indexForOutputConnection(index)
> skinPath = skinClusterNode.getPathAtIndex(pathIndex)
>
> print (jointNames)
>
> for geom in skinPath.verts:
>point = geom.getPosition('world')
>wts = skinClusterNode.getWeights(geom,0)
>for wt in wts:
>print wt
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: is it instance ?

2009-03-12 Thread yury nedelin
findRelatedSkinCluster
nice thanks Ryan
this will do the trick
Yury




On Thu, Mar 12, 2009 at 5:21 PM, ryant  wrote:

>
> Sorry I found out if you select the node that you instanced from that
> prune weights works but if you select the node you did not instance
> from it does not. Wierd. Maya does not always account for this kind of
> stuff. You can get around this though by writing your own command:
>
> getShape = cmds.listRelatives("pSphere1", shapes=True)
> parents = cmds.listRelatives(getShape[0], allParents=True)
> for p in parents:
>skin = mel.eval("findRelatedSkinCluster(\"" + p + "\");")
>if cmds.objExists(skin):
>print p, "is the transform that is skinned"
>
>
> On Mar 12, 5:06 pm, ryant  wrote:
> > Works for me. The skin is applied to the shape and there is only one
> > shape node parented to two transforms. I pruned weights and that
> > worked too. Got an example file you want to send me? I'm under your
> > same NDA ;o)
> >
> > On Mar 12, 4:52 pm, yury nedelin  wrote:
> >
> > > right that's all good but here is were i am confused,
> >
> > > so you have
> > > getShape[0] and 2 parents, let say sphere1 and sphere2 .
> >
> > > Skin sphere1 to a joint now your getShape[0] skinned.
> >
> > > Try pruning weights with Maya tool in Edit Smooth Skin on both sphere1
> and
> > > sphere2, and shapes.
> >
> > > How can I tell which one is actually skinned and which is not? Since
> it's
> > > the same shape and its skinned then is should not matter but it does.
> >
> > > Yury
> >
> > > On Thu, Mar 12, 2009 at 4:33 PM, ryant  wrote:
> >
> > > > If shape has two parent transforms it must be an instance right?
> >
> > > > import maya.cmds as cmds
> >
> > > > sphere = cmds.polySphere()
> > > > cmds.instance(sphere)
> >
> > > > getShape = cmds.listRelatives(sphere, shapes=True)
> > > > parents = cmds.listRelatives(getShape[0], allParents=True)
> > > > if len(parents) > 1:
> > > >print getShape[0], "is an instance"
> >
> > > > RyanT
> > > > Technical Artist
> > > >www.rtrowbridge.com/blog
> > > > NaughtyDog Inc.
> >
> > > > On Mar 12, 4:21 pm, yury nedelin  wrote:
> > > > > hi this is not really python specific but
> >
> > > > > what i a nice way to tell if object is an instance with mel/python?
> >
> > > > > Yury
> >
> >
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: is it instance ?

2009-03-12 Thread yury nedelin
right that's all good but here is were i am confused,

so you have
getShape[0] and 2 parents, let say sphere1 and sphere2 .

Skin sphere1 to a joint now your getShape[0] skinned.

Try pruning weights with Maya tool in Edit Smooth Skin on both sphere1 and
sphere2, and shapes.

How can I tell which one is actually skinned and which is not? Since it's
the same shape and its skinned then is should not matter but it does.

Yury



On Thu, Mar 12, 2009 at 4:33 PM, ryant  wrote:

>
> If shape has two parent transforms it must be an instance right?
>
> import maya.cmds as cmds
>
> sphere = cmds.polySphere()
> cmds.instance(sphere)
>
> getShape = cmds.listRelatives(sphere, shapes=True)
> parents = cmds.listRelatives(getShape[0], allParents=True)
> if len(parents) > 1:
>print getShape[0], "is an instance"
>
> RyanT
> Technical Artist
> www.rtrowbridge.com/blog
> NaughtyDog Inc.
>
> On Mar 12, 4:21 pm, yury nedelin  wrote:
> > hi this is not really python specific but
> >
> > what i a nice way to tell if object is an instance with mel/python?
> >
> > Yury
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] is it instance ?

2009-03-12 Thread yury nedelin
hi this is not really python specific but

what i a nice way to tell if object is an instance with mel/python?

Yury

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: Production Practices

2009-03-11 Thread yury nedelin
1) Revision control or No?  if yes, which?
Alienbrain and Perforce, but soon Perforce only

2) Do developers work on live files (ie. files seen by general users)
or in individual sandboxes?
Trying to encourage working on live files as much as possible.

3) Do you use Unit tests?
We enforce units and many other settings.

4) Are updates done in batch as an application release, or as needed
per file?  What is the update procedure?
We do not update applications (MAYA) during projects.

5) How many developers?
about 90 full time, maybe 5 contract

Yury



On Tue, Mar 10, 2009 at 1:08 PM, Ian Jones  wrote:

>
> 1) Revision control or No?  if yes, which?
> Yes - svn
>
> 2) Do developers work on live files (ie. files seen by general users)
> or in individual sandboxes?
> All developers work on a local checkout and commit to trunk when satisfied.
> All users run off a network mirror of /trunk
>
> Branches are used for larger changes to allow for intermediate commits
> (not mirrored to users) and peer-review. Juniors/Part-time technical
> artists work in branches to inspire peer-review/teaching by leads (who
> integrate changes to trunk and are responsible for stability).
>
> 3) Do you use Unit tests?
> On some systems but not all.
>
> 4) Are updates done in batch as an application release, or as needed
> per file?  What is the update procedure?
> As needed per file for local users, stable tag released as packages
> for off-site/outsource teams.
>
> 5) How many developers?
> 3 dedicated, 6 part-time
>
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: Which python UI package to choose ?

2009-02-28 Thread yury nedelin
If you on 64 bit you might have problems finding python UI modules, we could
not find one few month ago, but we are on maya 8.5 and using 2.4 python. Not
sure if maya 9 has python UI modules that work 64 bit but it is somthing to
consider.

yury



On Sat, Feb 28, 2009 at 12:56 PM, Mathew Berglund wrote:

> searching around i found this:
>
> http://groups.google.com/group/python_inside_maya/web/using-pyqt-with-maya?pli=1
>
>
> -Mat
>
> /*
> Mat Berglund
> Technical Animator
> Volition, THQ
> **/
> “I heard this lady say “I love kids.” That’s nice, a little weird though.
> It’s like saying “I like people, for a little while.” “How old are you? 14?
> Get away from me!””
>
>
> On Sat, Feb 28, 2009 at 2:39 PM, demetrius wrote:
>
>>
>> Re: pyQt - rumor has it that they will be offering a free commercial
>> license in March/April.  Also I think (could be wrong) Maya has pyqt
>> integrated in the package.
>>
>> suyati wrote:
>> > hi barakooda,
>> > we use qt for most of the UI`s (building them in QT designer and
>> > converting them to pyqt).
>> > works good from inside maya.
>> >
>> > -yuk
>> >
>> > On Feb 28, 5:35 pm, barakooda  wrote:
>> >
>> >> Thank you for the fast reply !
>> >> i see wxPython, and
>> >> PyQt
>> >>
>> >> i will happy to hear more suggestions before i start to dig
>> >>
>> >> thank you all!
>> >>
>> >> Barak Koren.
>> >>
>> >> On 28 פברואר, 12:29, Mathew Berglund  wrote:
>> >>
>> >>
>> >>> In the past i've used wxPython. But the problem is it takes over the
>> main
>> >>> thread. so you have to use the maya command port and send your script
>> calls
>> >>> over to maya. A little bit of work up front, but i like the results. I
>> >>> haven't tried other UI's.
>> >>>
>> >>> -Mat
>> >>>
>> >>> /*
>> >>> Mat Berglund
>> >>> Technical Animator
>> >>> Volition, THQ
>> >>> **/
>> >>> “I heard this lady say “I love kids.” That’s nice, a little weird
>> though.
>> >>> It’s like saying “I like people, for a little while.” “How old are
>> you? 14?
>> >>> Get away from me!””
>> >>>
>> >>> On Sat, Feb 28, 2009 at 10:26 AM, barakooda 
>> wrote:
>> >>>
>>  i almost  finish my core script (build it from scratch to teach my
>>  self maya and python
>>  here is my first output
>>  http://www.youtube.com/watch?v=UQhipf3f_zc
>> 
>>  now i want to build UI and i prefer more universsal way of making UI
>>  and not the standard mel UI
>> 
>>  any ideas suggestion will be welcome!!
>> 
>>  thank you
>> 
>>  Barak Koren
>> 
>> > >
>> >
>> >
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: decimal point

2009-02-25 Thread yury nedelin
thanks
Yury


On Wed, Feb 25, 2009 at 9:47 AM, chadrik  wrote:

>
> list comprehension:
> http://docs.python.org/tutorial/datastructures.html#list-comprehensions
>
> string formatting:
> http://docs.python.org/library/stdtypes.html#string-formatting-operations
> here's some common examples:
>
> # strings
> >>> f = 'foo'
> >>> '%8s' % f
> ' foo'
> >>> '%-8s' % f
> 'foo '
>
> # ints
> >>> '%04d' % 10
> '0010'
> >>> '% 04d' % 10
> ' 010'
> >>> '% 04d' % -10
> '-010'
>
> #floats
> >>> '%.3f' % 1.123456
> '1.123'
> >>>
>
>
>
> On Feb 25, 2009, at 6:33 AM, yury nedelin wrote:
>
> Chad,
> can you describe what's going on in
>
> >>> [ '%.02f' % x for x in a]
> ['1.11', '2.22', '3.33']
>
> I have never seen such syntax
> thanks
> yury
>
> On Wed, Feb 25, 2009 at 4:53 AM, barakooda  wrote:
>
>>
>> Thanx !
>> that really helpful and fast way.
>> i just have lots of Bboxs to check
>> thank you thank you
>> :=)
>> Barak
>>
>>
>>
>> On 25 פברואר, 02:00, Chad Dombrova  wrote:
>> > list comprehension:
>> >
>> >  >>> a= [ 1., 2., 3.]
>> >  >>> [ round(x,2) for x in a]
>> > [ 1.11, 2.22, 3.33]
>> >
>> > if you're rounding these values for the sake of printing them out then
>> > you should use:
>> >
>> >  >>> [ '%.02f' % x for x in a]
>> > ['1.11', '2.22', '3.33']
>> >
>> > On Feb 24, 2009, at 9:41 PM, barakooda wrote:
>> >
>> >
>> >
>> > > that what i did
>> > > but there is function that deal automatically with list or touple ?
>> > > that was my question basically
>> >
>> > > On 25 פברואר, 00:59, Chad Dombrova  wrote:
>> > >> python to the rescue:
>> >
>> > >>  >>> round( 1.24343, 2)
>> > >> 1.24
>> >
>> > >> On Feb 24, 2009, at 7:31 PM, barakooda wrote:
>> >
>> > >>> for example i have A=(1.2323,1.3232,1.454
>> >
>> > >>> i`m looking for automate function that will output same A but with 2
>> > >>> decimal points less
>> >
>> > >>> the new A will be:
>> > >>> 1.2,1.3,1.4)
>> >
>> > >>> i can do it manually but in my script  it wont be fun at all :-)
>> > >>> thank you !!!
>> >
>> >
>>
>>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python] Re: decimal point

2009-02-25 Thread yury nedelin
Chad,
can you describe what's going on in

>>> [ '%.02f' % x for x in a]
['1.11', '2.22', '3.33']

I have never seen such syntax
thanks
yury

On Wed, Feb 25, 2009 at 4:53 AM, barakooda  wrote:

>
> Thanx !
> that really helpful and fast way.
> i just have lots of Bboxs to check
> thank you thank you
> :=)
> Barak
>
>
>
> On 25 פברואר, 02:00, Chad Dombrova  wrote:
> > list comprehension:
> >
> >  >>> a= [ 1., 2., 3.]
> >  >>> [ round(x,2) for x in a]
> > [ 1.11, 2.22, 3.33]
> >
> > if you're rounding these values for the sake of printing them out then
> > you should use:
> >
> >  >>> [ '%.02f' % x for x in a]
> > ['1.11', '2.22', '3.33']
> >
> > On Feb 24, 2009, at 9:41 PM, barakooda wrote:
> >
> >
> >
> > > that what i did
> > > but there is function that deal automatically with list or touple ?
> > > that was my question basically
> >
> > > On 25 פברואר, 00:59, Chad Dombrova  wrote:
> > >> python to the rescue:
> >
> > >>  >>> round( 1.24343, 2)
> > >> 1.24
> >
> > >> On Feb 24, 2009, at 7:31 PM, barakooda wrote:
> >
> > >>> for example i have A=(1.2323,1.3232,1.454
> >
> > >>> i`m looking for automate function that will output same A but with 2
> > >>> decimal points less
> >
> > >>> the new A will be:
> > >>> 1.2,1.3,1.4)
> >
> > >>> i can do it manually but in my script  it wont be fun at all :-)
> > >>> thank you !!!
> >
> >
> >
>

--~--~-~--~~~---~--~~
http://groups.google.com/group/python_inside_maya
-~--~~~~--~~--~--~---



[Maya-Python Club:1694] Re: Need an itterator HELP ! !

2009-02-12 Thread yury nedelin
looks like life is nice and slow in Water Gardens.



On Thu, Feb 12, 2009 at 12:08 PM, Judd Simantov  wrote:

> lol... 2 ND people responding at the exact same time :)
>
>
>
> On Thu, Feb 12, 2009 at 12:06 PM, Judd Simantov  wrote:
>
>> this is a quick snippet I through together for you... it basically will
>> iterate the dag for meshes (you can set the filter type to whatever you
>> want)... then once you have the MDagPath or you can get an MObject to the
>> data you can do whatever you want to it.
>>
>>
>> ###
>>
>> import maya.OpenMaya as om
>>
>> iter = om.MItDag(om.MItDag.kDepthFirst, om.MFn.kMesh)
>>
>> while not iter.isDone():
>>
>> path = om.MDagPath()
>> iter.getPath(path)
>> print iter.partialPathName()
>>
>> iter.next()
>>
>>
>> ###
>>
>>
>> On Thu, Feb 12, 2009 at 11:44 AM, ryant  wrote:
>>
>>>
>>> This is not exactly what your asking for but it is along those lines.
>>> This is an example of how to iterate over the selected meshes. This is
>>> outside the context of my plug which I could show also but from the
>>> looks there you have most of what you need and something like this
>>> might work.
>>>
>>> # Get the selection and create a selection list of all the nodes
>>> meshes
>>> selection = OpenMaya.MSelectionList()
>>> OpenMaya.MGlobal.getActiveSelectionList( selection );
>>>
>>> # Create an itorator to iterate over the selection
>>> # Use the MFn class to as a filter to filter geometry types
>>> iter = OpenMaya.MItSelectionList ( selection,
>>> OpenMaya.MFn.kGeometric );
>>>
>>> # Iterate over selected geometry nodes
>>> while not iter.isDone():
>>>
>>>#Define local vars
>>>MObject iterMesh;
>>>MFnMesh selectMesh;
>>>MString name;
>>>MDagPath dagpath;
>>>
>>>#Get the mesh from iter
>>>iter.getDependNode( iterMesh );
>>>
>>>#Debuging and displaying info
>>>selectMesh.setObject( iterMesh );
>>>name = selectMesh.name();
>>>MGlobal::displayInfo( "retreiving mesh named : " + name );
>>>
>>>#Get the dag path of the geometry node
>>>iter.getDagPath( dagpath );
>>>
>>>iter.next()
>>>
>>> On Feb 12, 8:44 am, "pricee...@googlemail.com"
>>>  wrote:
>>> > Hey, i ve been writing a bullet collsion tool and have completed the
>>> > first part of the technical part. basically the function is to fire a
>>> > ray and detect the first intersection with a mesh. a big thanks to all
>>> > the people who post here cuz without your help i would nt of been able
>>> > to begin to understand what the hell any of this means! the code is
>>> > good and with 2 locators as ray start and direction it detects
>>> > intersection the name of the face intersected and the normals of the
>>> > face.
>>> >
>>> > The next stage is to build in an itterator that will cycle through all
>>> > the meshs in a scene? any suggestions ? at the moment it just looks
>>> > for pcube1
>>> >
>>> > import maya.cmds as mc
>>> > import maya.OpenMaya as om
>>> >
>>> > ## create 2 locators named start and finish to angle the ray points
>>> >
>>> > startWP = mc.xform('start',q=1,rp=1,ws=1)
>>> > FinishWP = mc.xform('Finish',q=1,rp=1,ws=1)
>>> >
>>> > vectBtwPnts=  ((startWP  [0] -FinishWP  [0])*-1), ((startWP  [1] -
>>> > FinishWP  [1])*-1), ((startWP  [2] -FinishWP  [2])*-1)
>>> > vectorToFinish = om.MFloatVector(vectBtwPnts[0],vectBtwPnts
>>> > [1],vectBtwPnts[2])
>>> >
>>> > def nameToNode(name ):
>>> > selectionList = om.MSelectionList()
>>> > selectionList.add( name )
>>> > node = om.MObject()
>>> > selectionList.getDependNode( 0, node )
>>> > return node
>>> >
>>> > #retireves the right DAG node for selected objects
>>> >
>>> > def nameToDag( name ):
>>> > selectionList = om.MSelectionList()
>>> > selectionList.add( name )
>>> > node = om.MDagPath()
>>> > selectionList.getDagPath( 0, node )
>>> > return node
>>> >
>>> > ## this is where the itterator is needed ? ?
>>> >
>>> > dag = nameToDag(" pCube1 " )
>>> >
>>> > meshFn = om.MFnMesh()
>>> > meshFn.setObject( dag )
>>> >
>>> > raySource = om.MFloatPoint(startWP[0],startWP[1],startWP[2])
>>> > rayDirection = vectorToFinish
>>> > rayDirection = rayDirection.normal()
>>> >
>>> > hitFacePtr = om.MScriptUtil().asIntPtr()
>>> > hitPoint   = om.MFloatPoint()
>>> >
>>> > idsSorted  = False
>>> > testBothDirections = False
>>> > faceIds= None
>>> > triIds = None
>>> > accelParams= None
>>> > hitRayParam= None
>>> > hitTriangle= None
>>> > hitBary1   = None
>>> > hitBary2   = None
>>> >
>>> > maxParamPtr  = 
>>> > worldSpace = om.MSpace.kWorld
>>> >
>>> > hit =  meshFn.closestIntersection(raySource,
>>> > rayDirection,
>>> > faceIds,
>>> > triIds,
>>> > idsSorted,
>>> > worldSpace,
>>> > maxParamPtr,
>>> > testBot

[Maya-Python Club:1667] Re: PyMEL 0.9 Release Candidate

2009-02-11 Thread yury nedelin
I would say lot of people are still on 8.5, all who started the production
over a year ago and on a big project.  We are on a 3-4 year project here,
and will be on 8.5 till I am guessing middle of 2010.

yury

On Wed, Feb 11, 2009 at 6:58 AM, Count Zer0  wrote:

>
> We're still on 8.5, makes life difficult using Python 2.4. Hope to
> move the team off it soon but not really my call.
>
> Would appreciate an 8.5 compatible version of Pymel 0.9 if it isn't
> too much work.
>
> Thanks again,
>
> -jason
>
> On Feb 10, 8:13 am, Chad Dombrova  wrote:
> > yeah, 2008 and 2009 only right now. i'll be looking into the 8.5
> > issue:  it has to do with our use of defaultdict.  making things
> > compatible with python2.4 is frustrating, to say the least.  one of
> > the things i wanted to get a sense of was how many people were still
> > using 8.5...
> >
> > -chad
> >
> > On Feb 10, 2009, at 4:58 AM, Sebastian Thiel wrote:
> >
> > > Unfortunately it does not appear to support Maya 8.5 at all. I tried
> > > to apply some fixes myself, but apparently it cannot create the
> > > Maya8.5 API cache, and thus many modules do not find meta
> > > information they need to startup.
> >
> > > If this is known, then I must have missed the note somewhere.
> >
> > > Otherwise I could try to provide patches that make it run on 8.5 if
> > > Chad thinks it's possible ( perhaps you use special 2008 API wrap
> > > features that are not available on 8.5 ).
> >
> > > Regards,
> > > Sebastian
> >
> > > On Tue, Feb 10, 2009 at 1:42 PM, Matt Estela 
> > > wrote:
> >
> > > Ha, go shaderboy go!
> >
> > > Now to get all of 3delights bindings in python... ...
> >
> > > On Tue, Feb 10, 2009 at 12:27 PM, Olivier Renouard
> > >  wrote:
> >
> > > > Nice one!
> >
> > > > Sorry I was basically no help recently... locked at work and they
> > > pried
> > > > out the ' from my keyboard to make sure I'm only writing SL and
> > > not Python.
> >
> >
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1614] Re: Python Chat For Maya

2009-02-07 Thread yury nedelin
 Kurian Thats awesome thanks cann't wait to give it try on Monday
Yury


On Sat, Feb 7, 2009 at 12:42 AM, Achayan  wrote:

>
> Hi All
>
> I am not a pure python programmer , but its a try to do something with
> python
>
> This tool is not using any telnet or anything just python socket ...
>
> Here you can download the source file
>
>
> http://www.highend3d.com/maya/downloads/mel_scripts/interface_display/download-5617.html?loc=pychat.zip
>
> And a websource http://www.stirkbin.com/50872
>
> Thanks
>
> Kurian
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1607] Re: ok this is MEL UI issue

2009-02-06 Thread yury nedelin
awesome this is very helpful,

I was going to just write one like that if there is no clever command
somewhere hidden away.

thanks Brian





On Fri, Feb 6, 2009 at 8:00 PM,  wrote:

> Goto:
> http://ewertb.soundlinker.com/mel/mel.101.htm
>
> -brian
>
>
>   Original Message 
> Subject: [Maya-Python Club:1604] Re: ok this is MEL UI issue
> From: yury nedelin 
> Date: Fri, February 06, 2009 10:09 pm
> To: python_inside_maya@googlegroups.com
>
> thanks
>
> This will definitely help but getting all children from Window itself would
> be very handy.
>
> I wonder if there is a way to do it from API.
>
> Yury
>
>
>
> On Fri, Feb 6, 2009 at 5:27 PM, Tim Fowler  wrote:
>
>> Query the childArray of the top level layout.
>>
>> eg:
>>
>> {
>>window;
>>columnLayout MyWindowLayout;
>>button; button; button;
>>floatSlider;
>>showWindow;
>> }
>>
>> layout -query -childArray MyWindowLayout;
>> // Result: button5 button6 button7 floatSlider1 //
>>
>>
>> On Fri, Feb 6, 2009 at 7:57 PM, yury nedelin  wrote:
>>
>>> What is a good way to list all children of a Window in MEL UI?
>>>
>>> Yury
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1604] Re: ok this is MEL UI issue

2009-02-06 Thread yury nedelin
thanks

This will definitely help but getting all children from Window itself would
be very handy.

I wonder if there is a way to do it from API.

Yury



On Fri, Feb 6, 2009 at 5:27 PM, Tim Fowler  wrote:

> Query the childArray of the top level layout.
>
> eg:
>
> {
>window;
>columnLayout MyWindowLayout;
>button; button; button;
>floatSlider;
>showWindow;
> }
>
> layout -query -childArray MyWindowLayout;
> // Result: button5 button6 button7 floatSlider1 //
>
>
> On Fri, Feb 6, 2009 at 7:57 PM, yury nedelin  wrote:
>
>> What is a good way to list all children of a Window in MEL UI?
>>
>> Yury
>>
>>
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1603] Re: what is a good way to deal with "None"?

2009-02-06 Thread yury nedelin
it's not Pymel I worry about it's about one hundred people that sit around
me that will be using the script, and their computers and the IT that will
set it up and version software and 64 bit verses 32 bit crap, and the rest.
I am just trying to keep things as bare bone as I can. I am sure Pymel is
good,  I only hear good things about it.

Yury


On Fri, Feb 6, 2009 at 5:30 PM, chadrik  wrote:

> yuri, you're not missing anything, that's just the way that it works.
>  they fixed some of the list/None issues in later versions of maya, but not
> many of them.
>
> so, in general, you have 2 choices:  wait for maya to fix its bugs and
> design flaws or fix them yourself.  you can go through and start wrapping
> all the commands that have this design flaw, but then you'd just end up
> doing what pymel already does.  catch 22.
>
> i also find it ironic that you say pymel has more bugs, when pymel actually
> fixes bugs in maya.   there are two ways to use pymel:  you can use it as a
> simple replacement for maya.cmds and program as you always have, but without
> these annoying bugs.  or you can go further and start using the real power
> of pymel, which lies in its extensions and additions to maya.cmds
>
> its your choice. live with it or do something about it.
>
> -chad
>
>
>
>
> On Feb 6, 2009, at 4:55 PM, yury nedelin wrote:
>
>
>
> On Fri, Feb 6, 2009 at 4:02 PM, yury nedelin  wrote:
>
>> Hey Ryan,
>>
>> yes
>> using "if" is fine, it just seem not very elegant.
>>
>> I do not like having to check all the time.
>>
>> Pymel is cool but I want to stick with maya python as it comes with maya.
>>
>> Fewer special needs fewer bugs.
>>
>> I guess its I will have to keep checking
>>
>> Maya should return empty list instead of nothing. But I might still be
>> missing something.
>>
>> Yury
>>
>>
>> On Fri, Feb 6, 2009 at 3:19 PM, ryant  wrote:
>>
>>>
>>> I dont think his question has anything to do with pymel. My point was
>>> if you use the if statement as designed it doesnt matter what the
>>> value is that is returned. Python returns True if the value is usable
>>> and false if it is not. Dont get me wrong I took a look at pymel and
>>> you guys are doing some great things with it.
>>>
>>> None==  False
>>> 0   ==  False
>>> 1   ==  True
>>> 2       ==  True
>>> []  ==  False
>>> [0] ==  True
>>> {}  ==  False
>>> {1:1}   ==  True
>>> ()  ==  False
>>> (1) ==  True
>>>
>>>
>>>
>>> On Feb 6, 2:29 pm, chadrik  wrote:
>>> > use pymel  :)
>>> >
>>> > On Feb 6, 2009, at 1:25 PM, yury nedelin wrote:
>>> >
>>> > > let say
>>> >
>>> > > mc.select(clear=1)
>>> > > print mc.ls(sl=1)
>>> > > >>None
>>> >
>>> > > I have to check if its "None" or a list if I want to do a For loop
>>> > > anything else with the List
>>> >
>>> > > Are there better ways than checking  >> if "None" >> all the time ?
>>> >
>>> > > Thanks
>>> > > Yury
>>>
>>>
>>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1600] ok this is MEL UI issue

2009-02-06 Thread yury nedelin
What is a good way to list all children of a Window in MEL UI?

Yury

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1599] Re: what is a good way to deal with "None"?

2009-02-06 Thread yury nedelin
On Fri, Feb 6, 2009 at 4:02 PM, yury nedelin  wrote:

> Hey Ryan,
>
> yes
> using "if" is fine, it just seem not very elegant.
>
> I do not like having to check all the time.
>
> Pymel is cool but I want to stick with maya python as it comes with maya.
>
> Fewer special needs fewer bugs.
>
> I guess its I will have to keep checking
>
> Maya should return empty list instead of nothing. But I might still be
> missing something.
>
> Yury
>
>
> On Fri, Feb 6, 2009 at 3:19 PM, ryant  wrote:
>
>>
>> I dont think his question has anything to do with pymel. My point was
>> if you use the if statement as designed it doesnt matter what the
>> value is that is returned. Python returns True if the value is usable
>> and false if it is not. Dont get me wrong I took a look at pymel and
>> you guys are doing some great things with it.
>>
>> None==  False
>> 0   ==  False
>> 1   ==  True
>> 2   ==  True
>> []  ==  False
>> [0] ==  True
>> {}  ==  False
>> {1:1}   ==  True
>> ()      ==  False
>> (1) ==  True
>>
>>
>>
>> On Feb 6, 2:29 pm, chadrik  wrote:
>> > use pymel  :)
>> >
>> > On Feb 6, 2009, at 1:25 PM, yury nedelin wrote:
>> >
>> > > let say
>> >
>> > > mc.select(clear=1)
>> > > print mc.ls(sl=1)
>> > > >>None
>> >
>> > > I have to check if its "None" or a list if I want to do a For loop
>> > > anything else with the List
>> >
>> > > Are there better ways than checking  >> if "None" >> all the time ?
>> >
>> > > Thanks
>> > > Yury
>> >>
>>
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1598] Re: what is a good way to deal with "None"?

2009-02-06 Thread yury nedelin
yes
using "if" is fine, it just seem not very elegant.

I do not like having to check all the time.

Pymel is cool but I want to stick with maya python as it comes with maya.

Fewer special needs fewer bugs.

I guess its I will have to keep checking

Maya should return empty list instead of nothing. But I might still be
missing something.

Yury



On Fri, Feb 6, 2009 at 3:19 PM, ryant  wrote:

>
> I dont think his question has anything to do with pymel. My point was
> if you use the if statement as designed it doesnt matter what the
> value is that is returned. Python returns True if the value is usable
> and false if it is not. Dont get me wrong I took a look at pymel and
> you guys are doing some great things with it.
>
> None==  False
> 0   ==  False
> 1   ==  True
> 2   ==  True
> []  ==  False
> [0] ==  True
> {}  ==  False
> {1:1}   ==  True
> ()  ==  False
> (1) ==  True
>
>
>
> On Feb 6, 2:29 pm, chadrik  wrote:
> > use pymel  :)
> >
> > On Feb 6, 2009, at 1:25 PM, yury nedelin wrote:
> >
> > > let say
> >
> > > mc.select(clear=1)
> > > print mc.ls(sl=1)
> > > >>None
> >
> > > I have to check if its "None" or a list if I want to do a For loop
> > > anything else with the List
> >
> > > Are there better ways than checking  >> if "None" >> all the time ?
> >
> > > Thanks
> > > Yury
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1597] Re: what is a good way to deal with "None"?

2009-02-06 Thread yury nedelin
Hey Ryan,

yes
using "if" is fine, it just seem not very elegant.

I do not like having to check all the time.

Pymel is cool but I want to stick with maya python as it comes with maya.

Fewer special needs fewer bugs.

I guess its I will have to keep checking

Maya should return empty list instead of nothing. But I might still be
missing something.

Yury


On Fri, Feb 6, 2009 at 3:19 PM, ryant  wrote:

>
> I dont think his question has anything to do with pymel. My point was
> if you use the if statement as designed it doesnt matter what the
> value is that is returned. Python returns True if the value is usable
> and false if it is not. Dont get me wrong I took a look at pymel and
> you guys are doing some great things with it.
>
> None==  False
> 0   ==  False
> 1   ==  True
> 2   ==  True
> []  ==  False
> [0] ==  True
> {}  ==  False
> {1:1}   ==  True
> ()  ==  False
> (1) ==  True
>
>
>
> On Feb 6, 2:29 pm, chadrik  wrote:
> > use pymel  :)
> >
> > On Feb 6, 2009, at 1:25 PM, yury nedelin wrote:
> >
> > > let say
> >
> > > mc.select(clear=1)
> > > print mc.ls(sl=1)
> > > >>None
> >
> > > I have to check if its "None" or a list if I want to do a For loop
> > > anything else with the List
> >
> > > Are there better ways than checking  >> if "None" >> all the time ?
> >
> > > Thanks
> > > Yury
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1592] what is a good way to deal with "None"?

2009-02-06 Thread yury nedelin
let say

mc.select(clear=1)
print mc.ls(sl=1)
>>None

I have to check if its "None" or a list if I want to do a For loop anything
else with the List

Are there better ways than checking  >> if "None" >> all the time ?

Thanks
Yury

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1539] Re: Maya Chat Messenger

2009-02-03 Thread yury nedelin
Too bad, let me know when you make the source available. I was looking
forward editing it for our needs here.

Our admin and tech directors do not like no source scripts.

I was looking forward playing with it.

Yury

On Tue, Feb 3, 2009 at 5:49 PM, ChrisChia  wrote:

>
> cos it's faster and it has "protection" to my code! :D
>
>
> On Feb 4, 3:29 am, Jo Jürgens  wrote:
> > why .pyc only?
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1530] Re: Maya Chat Messenger

2009-02-02 Thread yury nedelin
Will I be able to execute mel and python commands over the network and can I
see the feedback?  That would be very handy and save me a lot of time
walking around to people machines.

yury

On Mon, Feb 2, 2009 at 4:41 AM, ChrisChia  wrote:

>
> This mayachat not only opens to chatting, but u can also send mel or
> python commands across your network.
> This program will check your system for the latest installed maya on
> your machine.
> It will be stored on your maya script directory.
> You can then customise to make your other older version of maya
> recognise maya chatwin.
>
>
>
> On Feb 2, 1:10 pm, Deke Kincaid  wrote:
> > I'll stick with a simple jabber client like pidgin for the company
> > rather then depending on maya for chat.  Cool idea though.
> >
> > -deke
> >
> > On Sun, Feb 1, 2009 at 05:50, Chris Chia  wrote:
> > > I have created a maya chat messenger which allows users who are in the
> same
> > > network to be able to chat or even send MEL / Python script across the
> > > network.
> > > Try it:http://chrischia.info/blog/?p=21
> >
> > > --
> > > Regards,
> > > Chris
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1391] Re: How to render a new object in the dag

2008-12-07 Thread yury nedelin
use hardware renderer.

yury


On Fri, Dec 5, 2008 at 1:45 AM, vinod paul <[EMAIL PROTECTED]> wrote:

>
> how to render wireframe in maya
>
>
> help me
>
> On 12/4/08, Omar Agudo <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I am trying to render a new object placed in a new node in the dag.
> >
> > I am using the plug-in example of the API (basicShape.py)
> >
> > The problem is that when I render the scene, the new node (with the
> > new object), it doesn´ t appear.
> > The code that I use is:
> >
> >
> >
> > #IMPORT ZONE
> > import maya.standalone
> > import maya.OpenMaya as OpenMaya
> > import maya.cmds as cmds
> >
> > maya.standalone.initialize(name='python') # I use the
> > standalone mode
> >
> > import maya
> > maya.cmds.loadPlugin("basicShape.py")
> > maya.cmds.createNode("spBasicShape")
> >
> > cam = cmds.camera()
> > cmds.render(cam[0],batch=True,x=768,y=576)
> >
> >
> >
> >
> > What I am doing wrong???
> >
> > Thank you,
> >
> > Omar.
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1355] Re: query reference state

2008-11-24 Thread yury nedelin
try file command

yury


On Mon, Nov 24, 2008 at 2:11 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote:

>
> Hey guys, anyone know how to query the reference state of a reference?
> (loaded or unloaded)
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1104] Re: Maya listener Plugin

2008-09-15 Thread yury nedelin
I did not have time to look much into it but try this command in mel
cmdFileOutput
I think it will do what you need

Yury



On Mon, Sep 15, 2008 at 5:04 PM, Ravi Jagannadhan <[EMAIL PROTECTED]> wrote:

>
> There's also journalling, that might help.
>
> On Mon, Sep 15, 2008 at 5:03 PM, Taylor Carrasco <[EMAIL PROTECTED]>
> wrote:
> > Can you provide an example on how to log it?
> >
> > On Mon, Sep 15, 2008 at 8:56 AM, yury nedelin <[EMAIL PROTECTED]>
> wrote:
> >>
> >> maya already does it for you .
> >>
> >> just log the script editor output into a text file.
> >>
> >> yury
> >>
> >>
> >> On Mon, Sep 15, 2008 at 2:54 AM, ChrisChia <[EMAIL PROTECTED]>
> wrote:
> >>>
> >>> Hi all,
> >>> I need some advice here.
> >>> I wish to write a program (either inside or outside maya) to record
> >>> the list of maya actions created by a user.
> >>> For example,
> >>> Assuming that an user were using Maya, I wish to have all his actions
> >>> recorded.
> >>> How can I write such a plugin?
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> > >
> >
>
>
>
> --
> Where we have strong emotions, we're liable to fool ourselves - Carl Sagan
>
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---



[Maya-Python Club:1101] Re: Maya listener Plugin

2008-09-15 Thread yury nedelin
maya already does it for you .

just log the script editor output into a text file.

yury


On Mon, Sep 15, 2008 at 2:54 AM, ChrisChia <[EMAIL PROTECTED]> wrote:

>
> Hi all,
> I need some advice here.
> I wish to write a program (either inside or outside maya) to record
> the list of maya actions created by a user.
> For example,
> Assuming that an user were using Maya, I wish to have all his actions
> recorded.
> How can I write such a plugin?
>
> >
>

--~--~-~--~~~---~--~~
Yours,
Maya-Python Club Team.
-~--~~~~--~~--~--~---