nConstraint is giving the error "source attribute '.nucleusid' cannot be found

zackjavinlu
Explorer

nConstraint is giving the error "source attribute '.nucleusid' cannot be found

zackjavinlu
Explorer
Explorer

Full error:

// Error: file: C:/Program Files/Autodesk/Maya2019/scripts/others/createNConstraint.mel line 722: The source attribute '.nucleusId' cannot be found. //

I'm trying to make attach a cape to a walking animation using a point to surface nConstraint. I made the nCloth in a new animation scene using a referenced rig but it comes to this error every time. Other nConstraints like component to component also yields this error.

 

Things I've tried:

I've tried making the nCloth in the original rig and it yields the same error, so the error is not because I used a referenced file.

I've tried resetting my preferences but same error.

I've tried testing this constraint on a simple scene, a cube and a plane, and it works! So the problem is with the animation/mesh.

I have looked at the node editor and I don't understand it. I can confirm that the nRigidShape(the passive collider on the mesh) IS connected to the nucleus. Sorry, I'm still a beginner.

Component to Component on the nCloth cape DOES work.

Making the mesh a passive collider does work with the cloth. From what I understand, the point to surface nConstraint should automatically make the surface a passive collider. Regardless, I've tried making the passive collider before and after the nConstraint and it yields the same error.

I have deleted the history on the cape before creating the nCloth.

 

What I want to know is how to fix this error and what is causing it so I can avoid it in the future. I don't understand why nucleus ID is needed or why it cannot be found, or for what. Thanks in advance!

0 Likes
Reply
1,363 Views
1 Reply
Reply (1)

laomusic_arts
Advocate
Advocate

Hi!

I just had this issue and did this :

The error indicates that the .nucleusId attribute is missing, which suggests there might be an issue with the Nucleus solver or the constraints setup in Maya. Here are a few steps to troubleshoot and potentially resolve this issue:

Steps to Resolve the Error

  1. Check Nucleus Solver: Ensure that you have a Nucleus solver in your scene. If not, you can create one by going to the Dynamics menu set, then nDynamics > Nucleus > Create Nucleus.

  2. Check for Existing Nucleus Constraints: Sometimes existing constraints or their incorrect settings can cause issues. Delete any existing constraints on the vertex or object and try to recreate them.

  3. Reset Tool Settings: Reset the settings for the Nucleus constraint tools. Go to nDynamics > nConstraint > Point to Surface, and click the small option box next to it. Then, click "Edit" and choose "Reset Settings."

  4. Script Editor: Sometimes running specific MEL scripts directly can bypass the UI issues. Open the Script Editor and run the following commands:

 

 

// Select the vertex or vertices
select -r vertexComponent;

// Select the target object
select -add targetObject;

// Create the Point to Surface constraint
createNConstraint pointToSurface;

 

 

 

  • Replace vertexComponent with the appropriate vertex selection (e.g., pCube1.vtx[0]) and targetObject with the target object's name.

  •  

  • Check for Updates: Ensure that you have the latest service pack or update for Maya 2018 installed. Autodesk frequently releases updates that fix various bugs.

  •  

  • Scene Integrity: Sometimes scenes can become corrupted or have hidden issues. Try importing your objects into a new scene to see if the problem persists.

  •  

  • Manual Attribute Check: If the error persists, you might need to manually inspect and add the .nucleusId attribute if it is missing. Use the following MEL commands to inspect and potentially add the attribute:

 

 

// Check if the attribute exists
if (!`attributeExists "nucleusId" yourObjectShape`) {
    // Add the attribute if it doesn't exist
    addAttr -ln "nucleusId" -at long yourObjectShape;
}

 

 

  1. Replace yourObjectShape with the shape node of your object.

Example Steps:

  1. Select the vertex or vertices you want to constrain.

  2. Shift-select the target object.

  3. Run the following MEL command in the Script Editor:

 

 

createNConstraint pointToSurface;

 

 

By following these steps, you should be able to resolve the error and apply the Point to Surface constraint successfully. But I did NOT!!
I finally came with an old solution for the buggy Maya:
- on the old scene, I save the nCloth hard-work-hours as a preset

- create a new scene an imported the old one, overwritting it.
- I used the same saved presets as before and... VOILA!
Constrains working again!

Hope this helps others too!

LAO


0 Likes