Hello Marcus, You are right, it's just i'm running out of ideas... =) Cheers! Eduardo
On Wed, Feb 26, 2014 at 2:09 PM, Marcus Ottosson <[email protected]>wrote: > Isn't the issue that performing a certain set of actions via script > differs from when you run them manually? Not sure scaling could (or should) > have any effect on that. > > > On 26 February 2014 16:55, Eduardo Grana <[email protected]> wrote: > >> Hello David, >> It happens often, don't worry. Maybe you can chat with a rigger friend at >> your studio and ask him is they are doing some >> something that is obvious. Another thing that pops into my head is that >> maybe if you have a huge or a tiny character, and >> there maybe some precision issues. Maybe you also have some very small >> weights on your joints that get lost in the copying. >> You can test the last option by pruning your weights before copying de >> skin cluster. >> Hope it works out! >> Cheers! >> Eduardo >> >> >> On Wed, Feb 26, 2014 at 11:51 AM, David Martinez < >> [email protected]> wrote: >> >>> I tried adding those commands here and there but I'm still getting the >>> issue. >>> >>> Just for the record, most of the skinning is in the right place but >>> there are a few vertices that drift a little bit compared to the original >>> geo. It's not much but I was expecting it to be a perfect match. >>> Ironically, I tried with a few skinned objects of freely available >>> characters and I did not encounter the issue. Quite annoying that keeps >>> happening at work. :-S >>> >>> >>> >>> -- >>> David Martinez - Technical Animator >>> >>> Email: [email protected] >>> Website: http://www.elusiveideas.com >>> >>> >>> >>> >>> On Tue, Feb 25, 2014 at 6:18 PM, David Martinez < >>> [email protected]> wrote: >>> >>>> I will give it a go and let you guys know how it goes >>>> >>>> David Martinez >>>> >>>> On 25 Feb 2014, at 18:16, Marcus Ottosson <[email protected]> >>>> wrote: >>>> >>>> Sorry, I haven't looked through your code fully, but just had a quick >>>> thought. >>>> >>>> If the behaviour is different between scripted and manual, what happens >>>> if you were to play with >>>> cmds.refresh()<http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/refresh.html>and >>>> cmds.dgdirty()<http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/dgdirty.html> >>>> ? >>>> >>>> I'm thinking the differences may be because the viewport has time to >>>> update when performing manually, but not when run via script. Try putting >>>> in a few calls to refresh and/or dgdirty inbetween the lines of your core >>>> to force evaluation. >>>> >>>> >>>> On 25 February 2014 15:57, David Martinez < >>>> [email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> I've tried adding a call to 'copySkinClusterSettings' after creating >>>>> the skin cluster but I'm still getting small inconsistencies when I move >>>>> the joints (Although is pretty close) >>>>> Here is the latest code that I'm using: >>>>> >>>>> - https://gist.github.com/davidmartinezanim/9211736 >>>>> >>>>> I will try to repro that with a custom example and send you a link >>>>> tonight. >>>>> Cheers >>>>> >>>>> >>>>> >>>>> -- >>>>> David Martinez - Technical Animator >>>>> >>>>> Email: [email protected] >>>>> Website: http://www.elusiveideas.com >>>>> >>>>> >>>>> >>>>> >>>>> On Tue, Feb 25, 2014 at 3:17 PM, Eduardo Grana < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi David, >>>>>> >>>>>> I've made some rough code about copying the usual attributes you can >>>>>> tweak about a skin cluster >>>>>> (hope i didn't forget something!) >>>>>> >>>>>> http://pastebin.com/z4r9YPwt >>>>>> >>>>>> you can try that function in your code, and let me know how it goes! >>>>>> Cheers! >>>>>> Eduardo >>>>>> >>>>>> >>>>>> >>>>>> On Tue, Feb 25, 2014 at 10:31 AM, David Martinez < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi again, >>>>>>> >>>>>>> Would it be possible to retrieve the information from a skin cluster >>>>>>> so I can mimic the same settings when creating the new one? >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> David Martinez - Technical Animator >>>>>>> >>>>>>> Email: [email protected] >>>>>>> Website: http://www.elusiveideas.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, Feb 25, 2014 at 1:24 PM, Eduardo Grana < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Ok. >>>>>>>> Remeber that you not only should match the skin weights, but the >>>>>>>> settings in the skin cluster. >>>>>>>> Also be aware that there may be weighting between the different >>>>>>>> skinning methods (if weight blended is used) >>>>>>>> Cheers! >>>>>>>> Eduardo >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Feb 25, 2014 at 10:11 AM, David Martinez < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> Hi Eduardo, >>>>>>>>> >>>>>>>>> Yes, I did try with that and I get results that are closer but >>>>>>>>> still not quite what I was looking for. >>>>>>>>> >>>>>>>>> I will try to repro the issue in a free rig or something as the >>>>>>>>> scenes that I'm dealing with at the moment are not in the public >>>>>>>>> domain. >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> David Martinez - Technical Animator >>>>>>>>> >>>>>>>>> Email: [email protected] >>>>>>>>> Website: http://www.elusiveideas.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Feb 25, 2014 at 1:09 PM, Eduardo Grana < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> Hi David, >>>>>>>>>> I've tried with a sphere and 3 joints, maybe not the best test >>>>>>>>>> case, >>>>>>>>>> i'm wondering if you could send me a test case to figure it out >>>>>>>>>> better. >>>>>>>>>> Have you tried with influenceAssociation="closestJoint"? >>>>>>>>>> Cheers, >>>>>>>>>> Eduardo >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, Feb 25, 2014 at 9:55 AM, David Martinez < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Eduardo, >>>>>>>>>>> >>>>>>>>>>> I tried what you suggested but there are still a few vertices >>>>>>>>>>> that decide to get skinned to other joints and do not respect the >>>>>>>>>>> old >>>>>>>>>>> skinning information. I'm not sure what's causing the issue though. >>>>>>>>>>> Or why >>>>>>>>>>> it happens when I do it using code but not when using the >>>>>>>>>>> interface... >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> David Martinez - Technical Animator >>>>>>>>>>> >>>>>>>>>>> Email: [email protected] >>>>>>>>>>> Website: http://www.elusiveideas.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Tue, Feb 25, 2014 at 12:38 PM, Eduardo Grana < >>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hello David, >>>>>>>>>>>> >>>>>>>>>>>> Maybe you can try adding the noMirror=True flag on >>>>>>>>>>>> thecopySkinWeightscommand in line 20... >>>>>>>>>>>> Something like >>>>>>>>>>>> cmds.copySkinWeights(sourceSkin=currentSkinCluster, >>>>>>>>>>>> destinationSkin=newSkinCluster, >>>>>>>>>>>> surfaceAssociation="closestPoint", >>>>>>>>>>>> influenceAssociation=("name", "label", >>>>>>>>>>>> "oneToOne"), >>>>>>>>>>>> normalize = True, noMirror=True) >>>>>>>>>>>> I would also change the influenceAssociation to >>>>>>>>>>>> "closestJoint", but it seems to work with out it too... >>>>>>>>>>>> >>>>>>>>>>>> Cheers! >>>>>>>>>>>> >>>>>>>>>>>> Eduardo >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Mon, Feb 24, 2014 at 7:20 PM, David Martinez < >>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi, >>>>>>>>>>>>> >>>>>>>>>>>>> I'm working on a really simple script and yet I'm having >>>>>>>>>>>>> trouble getting the script to do what I want. >>>>>>>>>>>>> Here is a description of what I'm trying to do: >>>>>>>>>>>>> >>>>>>>>>>>>> Get selection >>>>>>>>>>>>> Duplicate the object >>>>>>>>>>>>> For any skin Clusters that the object may have >>>>>>>>>>>>> | Get joints skinned to the skin cluster >>>>>>>>>>>>> | Replace the selection with the duplicated object >>>>>>>>>>>>> | Adds the joints connected to the skin Cluster to the >>>>>>>>>>>>> selection >>>>>>>>>>>>> | Skin the new object >>>>>>>>>>>>> | Copy weights from one object to the other >>>>>>>>>>>>> >>>>>>>>>>>>> Here is the code that I have so far: >>>>>>>>>>>>> https://gist.github.com/davidmartinezanim/9198402 >>>>>>>>>>>>> >>>>>>>>>>>>> I've tried to get the code to have the same settings as I have >>>>>>>>>>>>> in Maya: >>>>>>>>>>>>> >>>>>>>>>>>>> - http://www.elusiveideas.com/smoothBindOptions.PNG >>>>>>>>>>>>> - http://www.elusiveideas.com/copySkinWeightOptions.PNG >>>>>>>>>>>>> >>>>>>>>>>>>> And yet, when I do it in Maya, it works, but when I run the >>>>>>>>>>>>> code, the original and duplicate objects are different. (When I >>>>>>>>>>>>> move one of >>>>>>>>>>>>> the joints, the skinning is not quite the same) >>>>>>>>>>>>> >>>>>>>>>>>>> Any ideas about what could be causing the issue? >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> David Martinez - Technical Animator >>>>>>>>>>>>> >>>>>>>>>>>>> Email: [email protected] >>>>>>>>>>>>> Website: http://www.elusiveideas.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 >>>>>>>>>>>>> [email protected]. >>>>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpyWbqvJkp7bFyh7jNZg3zJFV_iV902CjKd7xpoOL5dpbw%40mail.gmail.com >>>>>>>>>>>>> . >>>>>>>>>>>>> For more options, visit >>>>>>>>>>>>> https://groups.google.com/groups/opt_out. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Eduardo Graña >>>>>>>>>>>> www.eduardograna.com.ar >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> 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 >>>>>>>>>>>> [email protected]. >>>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CACt6Gr%3DsueS9ujBK%2BNCTQW8AtVpi-EpG-gbLK%3D5P7t0Qk%2BN9qw%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 >>>>>>>>>>> [email protected]. >>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpyP3bGdTEvz%2BNgZcbFXb6U1ROLEYbSPEycP0inW41-Jgw%40mail.gmail.com >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Eduardo Graña >>>>>>>>>> www.eduardograna.com.ar >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> 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 [email protected]. >>>>>>>>>> To view this discussion on the web visit >>>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CACt6GrkM8nfOH947uSLLgUPpZq1pcPPt969gujMneJ8ypFvzdw%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 [email protected]. >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpwzF4%3DuhVyCPqwsGSbVBsADd8p_f4ZRuWKfNzxT1-vzCA%40mail.gmail.com >>>>>>>>> . >>>>>>>>> >>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Eduardo Graña >>>>>>>> www.eduardograna.com.ar >>>>>>>> >>>>>>>> -- >>>>>>>> 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 [email protected]. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CACt6GrnKC0QMuTQ7mhmzLbOuNcM-imKU6OvvHtL7iZ4upJwgDg%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 [email protected]. >>>>>>> To view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpwbrrvCVnShLLSY_y4PY3-bav%2BqGGxWD94G0PheVVvAbA%40mail.gmail.com >>>>>>> . >>>>>>> >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Eduardo Graña >>>>>> www.eduardograna.com.ar >>>>>> >>>>>> -- >>>>>> 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 [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/python_inside_maya/CACt6Grmh2yZVMKR0qsp7%2BbCrvv4%3DioiO1NYe67vbKMfp-9FENA%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 [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpw1xTtVCA5M7Q5fp5GF%3DCvUTDaH3-oyFd86i8NeAk1EEQ%40mail.gmail.com >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> >>>> >>>> -- >>>> *Marcus Ottosson* >>>> [email protected] >>>> >>>> -- >>>> 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 [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCgPUF-Uvv%3Ddy5Gr2mafQW093GedjZadSOn1hgbyKW9qg%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 [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/CAMLeNpysZapcL%2BqocG-BMMBTauoWrNYePtbpEqkC-mUiUS%2B7hQ%40mail.gmail.com >>> . >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> Eduardo Graña >> www.eduardograna.com.ar >> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CACt6Grmzg04x2jYgTnwGsyNd__Z9uRoRwPzXB17CFhzj%3DNJwYA%40mail.gmail.com >> . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > *Marcus Ottosson* > [email protected] > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODPe%2BHq9Ctg0%2BDgsCHJ6239w7RbYarkF7N%3D4OerPzu92w%40mail.gmail.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- Eduardo Graña www.eduardograna.com.ar -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CACt6Grk4u6uPyFzcHaJ3j6TDG8M1sgyeFPPJd%3DYPec78BkBt_w%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
