Hi, I'm working on a free Nut_Bolt script but I'm getting an error. Let's say I'm Importing the Bolt_01 it's snapping to the selected face but again when I run this script on a new selected face it's taking back Bolt_01 to the origin. It shouldn't happen like that. For more REFER VIDEO. {
// create a window
window -title…
Hi. when my file is .ma everything is fine but when I try to import fbx file format again I'm getting the same error and I changed the code as you said.
Ah sorry I didn't try it with FBX. Apparently, importing .fbx does not return the object name the way .ma does so maybe hard coding the object name is the way to go.
Because you're hard coding the bolt name "Bolt_01" but when you rename you are renaming "nut_01"What you need to do is to capture the actual name generated with the importstring $current_bolt = `file -import "E:/Bolt_01.ma"`; And use $current_bolt for move/constraint/etc.