Skip to content

Commit

Permalink
adding soft min and max value to addAttribute #196
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Feb 7, 2023
1 parent 19a6758 commit 0ae7d69
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions release/scripts/mgear/core/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def addAttribute(
storable=True,
writable=True,
channelBox=False,
softMinValue=None,
softMaxValue=None,
):
"""Add attribute to a node
Expand Down Expand Up @@ -77,6 +79,11 @@ def addAttribute(
if maxValue is not None and maxValue is not False:
data["maxValue"] = maxValue

if softMinValue is not None and softMinValue is not False:
data["softMinValue"] = softMinValue
if softMaxValue is not None and softMaxValue is not False:
data["softMaxValue"] = softMaxValue

data["keyable"] = keyable
data["readable"] = readable
data["storable"] = storable
Expand Down

0 comments on commit 0ae7d69

Please sign in to comment.