PDA

View Full Version : CometSaveWeights not working in 2011


luigi
08-16-2010, 03:50 PM
comet saveweights doesnt load weight in 2011 any one knows how to fix it.

p, li { white-space: pre-wrap; }
/ cometSaveWeights: Finished reading weight data. //
// cometSaveWeights: Loading by point position... //
// gloves.vtx[0] matches gloves.vtx[0] (Internal Index 0) //
// Error: //
// Error: Syntax error //



If not any alternative tool for saving weight to a external file and be able to load it in world space?

Xeash
08-22-2010, 03:38 PM
yep the same thing for us. thats why we just switched to our own tool for saving/loading weights so thats would not happen again in future.
I think there is one, just keep looking. Bad thing that you cant do this in previous version and open the scene again in maya 2011 because 2011's skincluster don't have backward compatibilty (well thats for me, maybe i doing smth wrong).
Its not much coding really, probably day or two including mirroring ability.

djx
08-24-2010, 03:40 PM
I've fixed comet's script so it works in 2011. You can get it here (http://www.djx.com.au/mel/cometSaveWeights_2011.rar). I have not tested it much, but it seems to be ok. Let me know if you find problems.

David

rasamaya
08-24-2010, 04:45 PM
Thanks David.

luigi
08-24-2010, 04:51 PM
thanks djx , keen work of you updating comet tool, and great work on posedeformer.

xeash iw as rthinking to write my own tool but got plenty of other tools to do , so djx help is much apreciated.

PacManiac
08-30-2010, 03:23 PM
I'm having problems with comet's transfer skin weights, is that supposed to work in 2011? Thanks a lot for the save weights update!

musi
10-08-2010, 01:30 PM
Yep, same here, Xeash.

Do you have a way of getting/saving/loading DQ Blend Weight weight values?

EDIT:
I found it!

getAttr "skinCluster5.blendWeights[35]";

BoostAbuse
10-08-2010, 03:15 PM
yep the same thing for us. thats why we just switched to our own tool for saving/loading weights so thats would not happen again in future.
I think there is one, just keep looking. Bad thing that you cant do this in previous version and open the scene again in maya 2011 because 2011's skincluster don't have backward compatibilty (well thats for me, maybe i doing smth wrong).
Its not much coding really, probably day or two including mirroring ability.

The only unsupported parts of 2011 skinning for backwards compatability would be if you're using Blended Weight mode for DQ and Post normalization. If you just use regular Interactive normalization without DQ you should be able to read your 2011 file back into older versions. If not please let me know and I'll take another look.

thematt
10-08-2010, 07:13 PM
Shawn since I got you here :D question: why do we still have to rely on comet pose deformer to drive blendshape this way! also I find it weird that there is still no easy way to do corrective blendshape in maya or am I missing something? those tools would be so welcome it seems that I always have to rely on pluggin or doing it in Max that has had this option for years (but base on rotation of bones)..are those sort of thing plans for future release or will it stay that way? thanks for any answers just that it's boring sometime for us not to have access to that..those tool would be very usefull.

fahr
10-12-2010, 02:32 PM
Shawn, please, for the love of all that is holy, have someone on the team incorporate the comet scripts (and especially pose deformer) into the maya bonus tools (or maya proper) and keep them updated. It makes absolutely no sense why you wouldn't, considering how useful they are, and pose deformer still has yet to show up on the mac.

On a side note, the cometAttrEditor is also broken in 2011, which is an amazingly useful script for re-ordering attributes in the chennel box.

BoostAbuse
10-12-2010, 02:43 PM
You guys would need to ask Michael about that one as we don't have any control over that stuff, just Muscle. As far as the pose deformer while it's a good one it's not "the best" in my opinion and could be expanded on to handle better scenarios (triple axis solve for example like very heavy shoulder movement in all directions). It's better than nothing and I know the request has come up a few times for a PSD in Maya but it never seems to stick.

I'll take a look at the script that's broken if you want to attach it here, it's probably some UI flags that were changed with the QT port.

fahr
10-12-2010, 04:22 PM
Thanks for looking into this Shawn.

Im not exactly sure how to attach a mel script to a cgtalk post, so I'll paste the text below.


Here's the script:


// --------------------------------------------------------------------------
// cometAttrEditor.mel - MEL Script
// --------------------------------------------------------------------------
//
// DESCRIPTION:
// A util for dealing with some attribute stuff.
//
// REQUIRES:
// Nothing.
//
//
// USAGE:
// source "cometAttrEditor.mel"; cometAttrEditor();
//
// AUTHORS:
// Michael B. Comet - comet@comet-cartoons.com
// Copyright 2004 Michael B. Comet - All Rights Reserved.
//
// VERSIONS:
// 1.00 - Aug 27, 2004 - Initial Release.
//
// --------------------------------------------------------------------------


/*
* cometAttrEditor() - Main Entry
*/
global proc cometAttrEditor()
{
if (`window -q -ex cometAttrEditorWin`)
{
showWindow cometAttrEditorWin ;
return ;
}


window -w 230 -h 60 -t "Comet Attr. Editor - 1.00" cometAttrEditorWin ;

formLayout mainForm ;

button -l ("Move UP") -c ("cAE_moveAttrs(0)") -ann ("Slide selected channelBox attributes up.") btnUp ;
button -l ("Move DOWN") -c ("cAE_moveAttrs(1)") -ann ("Slide selected channelBox attributes down.") btnDown ;

formLayout -e

-af btnUp "top" 5
-an btnUp "bottom"
-af btnUp "left" 5
-ap btnUp "right" 0 50

-af btnDown "top" 5
-an btnDown "bottom"
-ap btnDown "left" 0 50
-af btnDown "right" 5

mainForm ;


showWindow cometAttrEditorWin ;

}


// --------------------------------------------------------------------------

/*
* cAE_moveAttrs() - Adjust attrs
*/
global proc cAE_moveAttrs(int $dir)
{

// What objs and attrs are highlighted in the channel box?
string $cbObjs[] = `channelBox -q -mol mainChannelBox` ;
string $cbAttrs[] = `channelBox -q -sma mainChannelBox` ;
int $i;

string $obj ;
for ($obj in $cbObjs)
{
if ($dir == 0) // Work top to bottom if moving up
{
for ($i=0; $i < size($cbAttrs); ++$i)
cAE_moveAttr($obj, $cbAttrs[$i], $dir) ;
}
else if ($dir == 1) // Work bottom to top moving down
{
for ($i=size($cbAttrs)-1; $i >= 0; --$i)
cAE_moveAttr($obj, $cbAttrs[$i], $dir) ;
}

// Must do this or channel box won't refresh.
string $sel[] = `ls -sl -l`;
select -cl ;
refresh ;
select -r $sel ;
}


}


// --------------------------------------------------------------------------

/*
* cAE_moveAttr() - Adjust one attr specified up or down.
* $dir: 0=up 1=down
*/
global proc cAE_moveAttr(string $obj, string $attr, int $dir)
{
string $udAttrs[] = `listAttr -ud $obj` ; // Get just user defined ones.
int $i ;

// First find out where in the order of all the user defined attrs this one is.
int $idx = -1 ;
for ($i=0; $i < size($udAttrs); ++$i)
{
if ($udAttrs[$i] == $attr)
{
$idx = $i;
break ;
}
}

// If we couldn't find it, it's not a ud, so ignore, we can't shift.
if ($idx < 0)
{
warning -sl 0 ("Can't shift "+$obj+"."+$attr+" it's not user defined.") ;
return ;
}

print ("// Shifting "+($dir==0 ? "Up" : "Down")+" "+$idx+".) "+$obj+"."+$attr+" //\n") ;

// Now shift as needed
if ($dir == 0 && $idx > 0)
{
cAE_dropToBottom($obj, $udAttrs[$idx]) ; // First this goes down

cAE_dropToBottom($obj, $udAttrs[$idx-1]) ; // Then the one above

// Then do the rest
for ($i=$idx+1; $i < size($udAttrs); ++$i)
{
cAE_dropToBottom($obj, $udAttrs[$i]) ;
}
}
else if ($dir == 1 && $idx < size($udAttrs)-1)
{
cAE_dropToBottom($obj, $udAttrs[$idx+1]) ; // First the one below goes down

cAE_dropToBottom($obj, $udAttrs[$idx]) ; // First this goes down

// Then do the rest
for ($i=$idx+2; $i < size($udAttrs); ++$i)
{
cAE_dropToBottom($obj, $udAttrs[$i]) ;
}
}

}

// --------------------------------------------------------------------------

/*
* cAE_dropToBottom() - Drop an attr to bottom by rename and back
*/
global proc cAE_dropToBottom(string $obj, string $attr)
{
renameAttr ($obj+"."+$attr) ($attr+"TEMPREN") ; // there
renameAttr ($obj+"."+$attr+"TEMPREN") ($attr) ; // and back again
}

// --------------------------------------------------------------------------

fahr
10-12-2010, 04:27 PM
Oh, and I agree pose deformer could be improved. It hasn't been updated in years, but its ALL we've got, as far as I know. So yeah, I suppose we could add that as a feature request. :)

Pose Space Deformer is open source, isn't it? Why couldn't autodesk support it?

EDIT: I suppose "support" is a strong word. I meant simply including it in bonus tools, or something similar.

BoostAbuse
10-14-2010, 11:18 PM
I'm no legal guru but open source has a number of licenses and depending on the license it can be a real nightmare if you're a commercial app. Apologies for the delay, I'm a bit buried under some stuff right now and I'm hoping to get some time to look over that script soon.

Philly13
10-26-2010, 04:02 PM
Nice one David!

fahr
11-03-2010, 10:51 PM
Hi Shawn! You haven't had a chance to look at that script yet have you? Thanks again!

djx
11-04-2010, 02:16 PM
Hi Chad,

I use a different attribute reorder script (one of the zooTools) but it used the same rename trick and therefore failed in 2011. The new trick is to delete the attribute and undo which comes with a few limitations, but works in many cases and is better than nothing.

So in the comet script you would need to replace those two renameAttr commands at the end, with these two

evalDeferred ("deleteAttr " + $obj + "." + $attr);
evalDeferred "undo";


evalDeferred is required to give maya time to register the delete with the undo queue (which must be on, obviously, for this to work). I get some errors from the undo if attributes have connections, but they do not seem to cause any problems - so far.

edit: I just tried the comet one myself. It works ok, but you need to keep selecting the channel in the channel box after each move. Maybe this can be automated.

David

BoostAbuse
11-07-2010, 07:56 AM
Hi Shawn! You haven't had a chance to look at that script yet have you? Thanks again!

Haven't forgotten I swear! Just been extremely busy with a ton of other things on my plate. It's on my list of thing to do when I get a moment :D

leonine
12-04-2010, 09:36 AM
Thanks David for the cometSaveWeights for 2011.
Now about the attribute manager scripts,I tried replacing the rename command with the delete and undo but as you said it doesn't work on attributes with a connection. A colleague suggested that instead of deleting and undoing, the attributes could be transferred to a temporary object and back to the original object. Now,I'm not a scripting artist and have only just started learning. Has anyone solved the problem?

LoveFest
12-18-2010, 01:51 AM
I'm a noob to Maya. Maya 2010 has a lot of subfolders under the Script directory. Which folder do I place Comet Scripts in? I put it in the top scripts directory, but it didn't show up in Maya.

This (http://forums.cgsociety.org/showthread.php?p=6805255#post6805255) is what I'm trying to accomplish.

EdmX
02-10-2011, 06:27 PM
hey djx...tanx a lot for this tip...
I just got it the cometAttr code and replace the code lines at the end and now it's owrking...tanx a lot.....
was going insane...maya 2011 has a lot of weird stuffs happening....


cheers...

michaelcomet
03-02-2011, 06:58 AM
This is ridonculous... I need to test in the latest Maya I guess... I haven't been using Maya much at all lately :( and definitely not for rigging... which is why I stopped supporting my pluigins... :|
What is the script brokeness in 2011 vs other versions?... I am curious... I'll have to DL the fix and stuff it into my zip at some point...

As for PSD..yes my PSD is all sorts of simple/hack/busted... I do wish it was built in too.. I suspect it's because I wrapped it into a GNU license that they can't grab it... oh well... live and learn...

thanks,
comet

Geuse
03-02-2011, 10:06 AM
Hi. yes it would be super if you'd wanted to fix your plugins for all of us who are still using Maya and rely on your scripts and plugins. What do you use for rigging instead? Only inhouse tools? I was under the impression Maya was used as the core 3d app.
Since Newt was cancelled I can't wait to see what you're cooking up next!

All the best!

LoveFest
03-02-2011, 08:38 PM
I haven't been using Maya much at all lately :( and definitely not for rigging... which is why I stopped supporting my pluigins... :|
*Off Topic: Curious, what are you using these days?

michaelcomet
03-02-2011, 11:18 PM
Yeah at home I am using Maya now but right now just doing some modeling work ...so no rigging.. if I was doing personal rig/anim stuff I'd be using it...

So I meant before is I've been doing so much rigging at work I've either not been doing 3d at home, or what little I am doing right now isn't actually rig work... Eventually I will get back into Maya rigging when I find a personal project to use it for ....and time...

At Pixar everything except for modeling is pretty much proprietary so we use Maya for modeling, as well as other apps like mudbox or zbrush in a few cases... but rigging, animation etc is all our internal software...

-comet

CGTalk Moderation
03-02-2011, 11:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.