Skip to content

Commit be1f771

Browse files
Make sure integers are stored as integer attributes on Collections.
Issue #222.
1 parent b5f7c2c commit be1f771

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

python/mmSolver/_api/collection.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ def _get_auxiliary_attr(col, attr, key, default_value):
143143
keyable=False,
144144
hidden=True,
145145
attributeType='bool')
146+
elif isinstance(default_value, (int, long)):
147+
maya.cmds.addAttr(
148+
attr_node,
149+
longName=aux_name,
150+
keyable=False,
151+
hidden=True,
152+
attributeType='long')
146153
else:
147154
maya.cmds.addAttr(
148155
attr_node,
@@ -189,6 +196,13 @@ def _set_auxiliary_attr(col, attr, key, value):
189196
keyable=False,
190197
hidden=True,
191198
attributeType='bool')
199+
elif isinstance(value, (int, long)):
200+
maya.cmds.addAttr(
201+
attr_node,
202+
longName=aux_name,
203+
keyable=False,
204+
hidden=True,
205+
attributeType='long')
192206
else:
193207
maya.cmds.addAttr(
194208
attr_node,

0 commit comments

Comments
 (0)