Home Website Youtube GitHub

Rope rig generator doesn't work

Hello!

I’ve been trying to generate a rope via the “rope rig generator” from Rigbits these last few days. However, it doesn’t create joints. Not that I cannot add them manually but I wonder what the issue could be.

I create 2 curves: control and up vector curve as indicated, then select them in that order.

Has anyone else encountered that problem? What could I overlook?

Thanks!

What version of mGear? What version of Maya?

Do you see any errors or warnings in the script editor when you run it? My guess is you have an error, and it doesn’t finish running.

1 Like

I work on Maya 2023, and I use mGear 4.0.9.

The script editor shows only the selection of the curves. For example:
select -r curve1 ;
select -r curve1 curve2 ;
And then nothing more.

However, I did a quick test and the result is this: The rope generator works fine if the maya scene is empty (no other rigs included in the scene). If there is another rig in the scene (mGear rig and AdvancedSkeleton rig in my case), then the rope generator doesn’t work as explained: no joints are generated.

Could it be any sort of incompatibility?

One more update: it turns out that it does generate joints but it places them under the joints folder of the existing mGear rig (jnt_org) instead of where they should belong under the newly created rope rig. It seems like it gets confused and puts the joints under the existing hierarchy?!

Ah, so the joints were just under a hidden group?

I don’t know, but I guess that is intentional. If there is a Shifter rig in the scene, I guess it assumes you are working on it, and trying to add to the rig. If you are making a separate prop, you likely should be working on a blank scene.


You could consider modifying the rope code.
mgear_X.X.X/release/scripts/mgear/rigbits/rope.py

Line 93

        shd = rigbits.addJnt(oTrans)

rigbits.addJnt() takes an optional parent flag to specify where the joint will be parented. If none is specified, that is where the assumption occurs. You could modify it so that it puts it under the rope rig’s root, which is the root variable in the script. (You’d likely need to restart Maya after editing the script.)

Line 93

        shd = rigbits.addJnt(oTrans, parent=root))

Hi, thank you!

It almost worked with “shd = rigbits.addJnt(oTrans, parent=root)”! It now places them under the “Rope_root” folder, but I want to place each under its corresponding “…lvl” folder. I am not a scripter so I’ll need some time to think over this and will tell you when I come up with a solution.

Solved in this way: shd = rigbits.addJnt(obj=oTrans, parent=oTrans)

1 Like