Home Website Youtube GitHub

Spring Manager- Presets Not Saving

Hello, I am using Mgear 5.3.5 and trying to use the Spring Manager. Most of it is working but when it comes to saving a preset, I set a library and then select the controls with Springs on them. I then select Store Preset and get this error:

# Traceback (most recent call last):
Inc\Documents\maya\modules\scripts\mgear\animbits\spring_manager\ui.py", line 330, in store_preset
#     setup.store_preset_from_selection(self.presets_library_directory + file_name)
Inc\Documents\maya\modules\scripts\mgear\animbits\spring_manager\setup.py", line 550, in store_preset_from_selection
#     store_preset(nodes, filePath)
Inc\Documents\maya\modules\scripts\mgear\animbits\spring_manager\setup.py", line 531, in store_preset
#     node_config = get_config(node)
#   File "C:\Users\lisieca\OneDrive - Hasbro Inc\Documents\maya\modules\scripts\mgear\animbits\spring_manager\setup.py", line 518, in get_config
#     attr_val = get_settings_attr_val(node)
Inc\Documents\maya\modules\scripts\mgear\animbits\spring_manager\setup.py", line 196, in get_settings_attr_val
#     attr_vals[attr] = node.attr(attr).get()
#   File Inc\Documents\maya\modules\scripts\mgear\pymaya\attr.py", line 256, in get
#     return cmd.getAttr(self, *args, **kwargs)
#   File Inc\Documents\maya\modules\scripts\mgear\pymaya\cmd.py", line 330, in getAttr
#     raise exception.MayaAttributeError(*e.args)
# mgear.pymaya.exception.MayaAttributeError: Message attributes have no data values.

Its saying no data values, but I have set up the springs and see them working in the file. I’ve tried keying the Spring channels in the channel box and I still get “no data values”. Is there something I am missing?

After further investigation I am seeing that the issue is resolved if I specifically go into the outliner and select the sprg_root for each control that I have applied springs to. And then select store_presets. This doesn’t seem to be how it was supposed to work according to the Spring Manager walkthrough from 2 years ago. I am wondering if there is a possible fix to this that would be more convenient than having to dig into the outliner and select every spring root. Thanks!

I’ve got an update for this, (I work with alisieck and they’ve asked me to investigate). Saving a preset with the spring manager throws an error when it tries to query the value of the attribute “springSetupMembers”. This is a message attribute and has no data value to return.

Looks like this attribute can be filtered out of the query by changing lines 194 and 220 in release/scripts/mgear/animbits/spring_manager/setup.py

from -
for attr in SPRING_ATTRS[:-4]:

to -
for attr in SPRING_ATTRS[:-5]:

This is the section of code that handles storing and retrieving editable spring attributes to/from preset files. Skipping “springSetupMembers” here seems like the intended behavior. At least I’m not seeing any complications come from it…

What I mean to say is, it’s working on my end :smile:

NOTE:
Selecting the sprg_root appeared to work for alisieck only because it does not throw an error. The preset is created but does not store the desired data as the root node does not hold the necessary attributes and is skipped.

1 Like

spring Manager 2.0 is almost ready :wink: