Source Filmmaker

Source Filmmaker

IK Rig issue
Okay, so Im working on making an IK Rig for the Walker model and I have run into a bit of an issue. I've been using the console to fix my issues and at some point, I get an error stating that my return is an outside function. I've tried many things that I could find online, but so far, it either leads to the same error or it leads to a different error completely.

Here's the script I have made so far: https://mega.nz/#!yAdjELYK!Ulm7BUgxpPs9nhA38r3st8FHxZMhFBrhPVojCNpFyqM

Who wants a rig that crashes SFM?! xD

Now, the error is on line 262. If you see what the error is exactly and can help me with identifying what is causing this problem, I'd be much grateful.
Last edited by Kumquat [Velbud]; Oct 18, 2015 @ 7:53pm
< >
Showing 1-15 of 28 comments
episoder Oct 18, 2015 @ 2:57pm 
you don't have ik targets to build the legs. it's the tip of the claws. you need bones or points to target there. you could calculate them or remodel.

that disassembling model is really... well... tricky to animate.

*gosh* i gotta do it? my head gon' explode. x)
Detonatress Oct 18, 2015 @ 3:04pm 
Originally posted by episoder:
you don't have ik targets to build the legs. it's the tip of the claws. you need bones or points to target there. you could calculate them or remodel.

that disassembling model is really... well... tricky to animate.

*gosh* i gotta do it? my head gon' explode. x)
It's pretty much based on the same principle as the MvM robots. They can be disassembled and they can work with IK rigs too.
http://imgur.com/a/NADGB

On a second note, OH MAN! This cracks me up! I applied rig biped simple to the disassembled spy.
http://imgur.com/9crKyOD
Last edited by Detonatress; Oct 18, 2015 @ 3:06pm
episoder Oct 18, 2015 @ 3:44pm 
yeh. the disassembly isn't really the problem. everything sticks with parent bones. but... it's that the mvm model got feet. that is the bone or dag or point you need. the ik target of the ik chain. the claw doesn't have that.
Kumquat [Velbud] Oct 18, 2015 @ 5:08pm 
Hmm, I'm working on modifying it so that the rig doesn't necessaril require a foot bone at the tip. I just hope it works. So far, the job is to get the rig to actually work. When it does, that is when I will, or tell Detonatress to, make changes to the model itself with those bones. So far, getting the dirtier and harder work done is in order. In addition, I updated my python so now the rig is visible but not really moving the model (yet). Check the top for the updated link.
episoder Oct 18, 2015 @ 11:32pm 
didn't do much. i love sfm crashing for no reason. /sarcasm does only crooked joints. the ik legs dones't work with a dummy handle as ik target. there[drive.google.com]. it looks stupid. the hierarchy is a mess. i'll try the recompile later... after a nap. i'm sure it'll work. i'm not sure if wanna keep all the bones for disassembly tho. that be welded. and for the whole walk thing to look good you gotta replace the socket leg thing with a solid bubble joint. those bolts gotta go. there's no way around that. imho
Last edited by episoder; Oct 18, 2015 @ 11:34pm
Detonatress Oct 19, 2015 @ 5:33am 
Originally posted by episoder:
didn't do much. i love sfm crashing for no reason. /sarcasm does only crooked joints. the ik legs dones't work with a dummy handle as ik target. there[drive.google.com]. it looks stupid. the hierarchy is a mess. i'll try the recompile later... after a nap. i'm sure it'll work. i'm not sure if wanna keep all the bones for disassembly tho. that be welded. and for the whole walk thing to look good you gotta replace the socket leg thing with a solid bubble joint. those bolts gotta go. there's no way around that. imho
Isn't there a way to make it ignore the bolts? Or somehow make it stop the disassembling only when rigged, but allow disassembling after the rig gets removed?

I've tried the script you've shared, it gives me this error:
Traceback (most recent call last):
File "<string>", line 397, in <module>
File "<string>", line 179, in BuildRig
File "a:\program files\steam\steamapps\common\sourcefilmmaker\game\usermod\..\sdktools\python\global\lib\site-packages\sfm\sfmUtils.py", line 66, in FindFirstDag
raise errorString
TypeError: exceptions must be old-style classes or derived from BaseException, not str
Last edited by Detonatress; Oct 19, 2015 @ 5:40am
Detonatress Oct 19, 2015 @ 8:49am 
Question: what happens if I put an unassigned "toe" bone to the claw's tip? What are the rules for this "toe" bone in a rig? (must have vertex assignments or not?) I've read in some thread that all Pte Jack had to do to get a rig working after getting similar errors was to add that toe bone.
episoder Oct 19, 2015 @ 9:00am 
♥♥♥♥♥♥♥♥♥♥. gotta d/l my own crap again. "File "<string>", line 179, in BuildRig" is
boneRoot = sfmUtils.FindFirstDag( ["Root"], True )
was the root handle not there anymore? you changed the model?

anyway... if that[drive.google.com] doesn't work, you're screwed. the bolts and texture fixes are your problem now.
Last edited by episoder; Oct 19, 2015 @ 9:01am
Detonatress Oct 19, 2015 @ 9:13am 
Originally posted by episoder:
♥♥♥♥♥♥♥♥♥♥. gotta d/l my own crap again. "File "<string>", line 179, in BuildRig" is
boneRoot = sfmUtils.FindFirstDag( ["Root"], True )
was the root handle not there anymore? you changed the model?

anyway... if that[drive.google.com] doesn't work, you're screwed. the bolts and texture fixes are your problem now.
Wait, are you using this on the Workshop version or did Strashniy give you the current version?

The blend file shows that it's the version before I did the renaming of all bones to Back instead of rear, and the model is not the one with the Sharps added, but it's a later version than the workshop one.
If I change all the words "Rear" to "Back" in the script, will that work or break it?


Most recent model: https://copy.com/WRkTu0AEvrayemBf
Last edited by Detonatress; Oct 19, 2015 @ 9:31am
episoder Oct 19, 2015 @ 9:35am 
ehh. what? like i posted earlier. it's the custom/fix i did. a recompile. ofc it's from the workshop model that's up right now. what else? nobody gave me any src file. got it myself. ;)

you could possibly safe the bolts on the sockets if you reparent them to the socket pieces. so they don't move with the ik legs. that's what i thougt real quick. but i'm pretty much dunzo with it. :)

and... that recent model link is empty somehow. or am i doing something wrong?
Last edited by episoder; Oct 19, 2015 @ 9:41am
Detonatress Oct 19, 2015 @ 9:40am 
Originally posted by episoder:
ehh. what? like i posted earlier. it's the custom/fix i did. a recompile. ofc it's from the workshop model that's up right now. what else? nobody gave me any src file. got it myself. ;)

and... that recent model link is empty somehow. or am i doing something wrong?
Try again and click on download at the top right.
Also, Strashniy should have mentioned about the edits. The one in the link is the most recent one I have.

Edits include: eye rim allows eye to go over the head (I see you also did a similar edit), leg socket bones are positioned so that it allows for more rotation, hemispheres allow for opening to the sides, bones' "Rear" changed to "Back" and the parts that needed sharpening have been sharpened.
Also, there is a second model that looks like the original. Bone naming is the same for both, only the eye and its rim is differently positioned for each.
Last edited by Detonatress; Oct 19, 2015 @ 9:46am
Detonatress Oct 19, 2015 @ 10:06am 
Originally posted by episoder:
ehh. what? like i posted earlier. it's the custom/fix i did. a recompile. ofc it's from the workshop model that's up right now. what else? nobody gave me any src file. got it myself. ;)

you could possibly safe the bolts on the sockets if you reparent them to the socket pieces. so they don't move with the ik legs. that's what i thougt real quick. but i'm pretty much dunzo with it. :)

and... that recent model link is empty somehow. or am i doing something wrong?
I could do that and yeah it would look better because they'd no longer show the black area as well.


Is the link still empty? Note that I have replaced the link, because the first time the stuff there got removed while I was removing other stuff.

Also, the rig for the old version seems to work pretty well. If it could be adapted to the new model, I think this will do.


I can parent the bolts to the sockets, and then the rig could rotate the entire socket instead of just the bolts. I think I'll just need to put the bones for the sockets somewhere in the back, so I won't need to turn them into spheres. Any needs of change to the skeleton of the model in the link, please state them here, I will modify them.
Last edited by Detonatress; Oct 19, 2015 @ 10:27am
episoder Oct 19, 2015 @ 10:29am 
i just reparented the socket bolts. easy fix. the bolts in the claw are irrelevant cause they are parented to the claw. they move with it. so... no glitches happen. ofc the same when using ik.

still that... the script will not work with your model. there's no adaption possible. even if i rename everything. as you can see the former script i posted. that doesn't have any possibilities to build the ik chain to the claw. it's not working without target bone at the end of the claw. i can't fix that. you have to edit the mesh in blender to assign the tip bones. like i did. as example. :)
Detonatress Oct 19, 2015 @ 10:32am 
Originally posted by episoder:
i just reparented the socket bolts. easy fix. the bolts in the claw are irrelevant cause they are parented to the claw. they move with it. so... no glitches happen. ofc the same when using ik.

still that... the script will not work with your model. there's no adaption possible. even if i rename everything. as you can see the former script i posted. that doesn't have any possibilities to build the ik chain to the claw. it's not working without target bone at the end of the claw. i can't fix that. you have to edit the mesh in blender to assign the tip bones. like i did. as example. :)
Ok, I could add the tips, weld the first bolts to their sockets and what else does it need?

I will post an updated link here once I finish changing.
episoder Oct 19, 2015 @ 11:14am 
*taps on table*. damnit... i'm done already. i just need your tip bone names. and i hope you didn't change anything weird. x)

don't merge the bolt meshes. just parent the bolt1 bones with the socket bones.
Last edited by episoder; Oct 19, 2015 @ 11:14am
< >
Showing 1-15 of 28 comments
Per page: 1530 50

Date Posted: Oct 18, 2015 @ 11:35am
Posts: 28