I’m trying to setup Character Extensions in MotionBuilder using the SDK. I’ve followed a sample distributed with MotionBuilder, but get a different result than when setting them up by hand.
When setting up by hand, object reference and object labels are added as Custom attributes. Through script they are not.
Setup by hand:
Also when setting up through the SDK, you get double entries for property references, if you follow the Python samples:
This is a really good observation. Is the only negative affect you’ve seen so far the Mirror Pose not working? Do the extensions otherwise seem to function properly?
Ah yes, that’s it. I was attaching to the character by setting the ‘Attached Character’ property manually. But I swapped in using the AddCharacterExtension method and now it looks like it’s working correctly. Thanks!
[QUOTE=stev;22523]Is the only negative affect you’ve seen so far the Mirror Pose not working? Do the extensions otherwise seem to function properly?[/QUOTE]
Yeah, mirroring is the only thing that I’ve noticed not working.
Thanks a lot, unfortunately that did not fix it.
I finally got my Subscription Support re-enabled, so I’m going to run it by them. I’ll let you know what I find.
I’m already setting the reference model, extensions label and object labels for mirroring (the pictures in my original post don’t reflect my scripted results), but unfortunately I don’t get the “Green properties” or mirroring working. Here is my code:
def create_character_extension(model):
object_extensions_labels = {
'L_Hand_Attacher': 'Hand_Attacher',
'R_Hand_Attacher': 'Hand_Attacher'}
mirror_partners = {
'L_Hand_Attacher': 'R_Hand_Attacher',
'R_Hand_Attacher': 'L_Hand_Attacher'}
parent_overrides = {
'Ground': FBSystem().Scene.Characters[0].GetModel(FBBodyNodeId.kFBHipsNodeId)}
char_extension = FBCharacterExtension('%s_Ext' % model.Name)
if model.Name in parent_overrides:
char_extension.ReferenceModel = parent_overrides[model.Name]
elif model.Parent:
ref_Object = model.Parent
char_extension.ReferenceModel = ref_Object
# TODO: Figure out if we need these?
char_extension.AddObjectDependency(model)
#char_extension.AddObjectProperties(model)
FBSystem().Scene.Characters[0].AddCharacterExtension(char_extension)
if model.Name in object_extensions_labels:
char_extension.PropertyList.Find('%s.Label' % model.Name).Data = object_extensions_labels[model.Name]
if model.Name in mirror_partners:
for index in range(len(FBSystem().Scene.CharacterExtensions)):
if mirror_partners[model.Name] in FBSystem().Scene.CharacterExtensions[index].Name:
char_extension.MirrorLabel = int(index) + 2
Whoa, making those changes, my character blows up when applying animation through story (though the stance looks ok) I really appreciate it though, getting MotionBuilder sdk help is a truly rare thing.
I think I’m just going to wait it out and see what Subscription comes back with. I’ll make sure to post my working (hopefully) code here.
Soooo… Turns out there is a bug in MotionBuilder and a bug with my testing!
The mirroring issue is not caused by setting up Character Extensions with the SDK vs. by hand, but rather by using the 2014 Character Solver. Move to a previous solver and mirroring works a treat. Sorry about any confusion :p:
The HIK solver is extremely broken in the last few versions of mobu. It looks like they might have fixed some issues in 2014, but I would always use the MB solver.
Sune, that is terrible and also why my file for my current rig update wouldn’t work, bahhh!!! Tarcus, I would 99% of the time say use MB solver but that solver is no longer getting the love, HIK is and with all the fixes to it I have been !!!TRYING!!! to use it more as I have found diffrent issues with the MB solver that are fixed now in the HIK solver. Until they release a service pack/hot fix for Mobu 2014 I guess we are stuck back on the MB solver if you want extensions to work. One step forward, 10 back…
Honestly we have never had extensions setup on our characters before now, so even if extension mirroring is broken when pasting poses, technically we would not be at a loss. That said, it should of course work:-)
I’m pretty interested in hearing about specific issue you might have had with the 2014 solver (or 2013 so we can check if they work in 2014)?
Regarding a Service Pack, I would not hold out for one, seeing as the release of service packs and extensions for all the other packages at the traditional time has come and gone…
Well I stayed away from HIK in 2013, and only started trying to rely on HIK in 2014, but between some handle issues and now maybe extension issues, I need to double check and confirm I am seeing the something and it isn’t a diffrent but. I am not going to let up on service pack