Hey @mocoloco,
I had time to revisit this today with less time pressure than I had before. I made some mistakes in my prior answer:
MINSLIDER
and MAXSLIDER
are being written even when the unit is DEGREE
- Being the first item or not in a group is irrelevant for the problem, the determining factor is if the new range is larger or smaller than the old one.
- When one overwrites an edit and slider range with a range that is larger than the old one, and the unit is degree:
- Both the edit and slider range remain the old value for the user when interacting with the GUI,
- But the position of the slider know on the slider bar reflects the new value, with the side effect that the user cannot drag the knob all the way, as the range is still clamped to the old values.
- And the description data that are stored reflect the new value.
- For any other unit other than
DEGREE
this does not happen.
You can see here the effect for the same plugin I used in my prior posting, where both parameters are initialized as [-90°, 90°]
. The first one is then changed to [-45°, 45°]
and the second one to [-180°, 180°]
. The first parameter works fine, while the second one exhibits the effects described above with both the value and slider clamp range being unchanged while the slider position reflects the new value.

Fig. I: When the unit is DEGREE
, increasing the value and slider range will fail. Also shown here, I compare the description of our modified bar.y
parameter with a user data parameter of the same date type, unit, and range. The values are identical.
I also talked with one of our GUI developers and he does not see any problems with the code we use either. This is very likely a bug, since the data in the description is the same (bar.y
and data.x
in the example screen cast above and the print out below), but treated differently, when and only when the unit is DEGREE
. I have filed an issue for that in our bug tracker.
I currently also do not see any good workaround for this for you. You will have to wait for a fix or the dev untangling the core issue and telling us how you can work around this. I have for now classified the issue as low priority, which means it might take some time before we get to it.
Cheers,
Ferdinand
The script to print out the description of the active tag I used in the example:
import c4d
import typing
DESC_MAP: dict[int: str] = {
c4d.DESC_NAME: "DESC_NAME",
c4d.DESC_SHORT_NAME: "DESC_SHORT_NAME",
c4d.DESC_VERSION: "DESC_VERSION",
c4d.DESC_CHILDREN: "DESC_CHILDREN",
c4d.DESC_MIN: "DESC_MIN",
c4d.DESC_MAX: "DESC_MAX",
c4d.DESC_MINEX: "DESC_MINEX",
c4d.DESC_MIN: "DESC_MIN",
c4d.DESC_MAXEX: "DESC_MAXEX",
c4d.DESC_MAX: "DESC_MAX",
c4d.DESC_STEP: "DESC_STEP",
c4d.DESC_ANIMATE: "DESC_ANIMATE",
c4d.DESC_ANIMATE_MIX: "DESC_ANIMATE_MIX",
c4d.DESC_ASKOBJECT: "DESC_ASKOBJECT",
c4d.DESC_UNIT: "DESC_UNIT",
c4d.DESC_PARENTGROUP: "DESC_PARENTGROUP",
c4d.DESC_CYCLE: "DESC_CYCLE",
c4d.DESC_HIDE: "DESC_HIDE",
c4d.DESC_DEFAULT: "DESC_DEFAULT",
c4d.DESC_ACCEPT: "DESC_ACCEPT",
c4d.DESC_SEPARATORLINE: "DESC_SEPARATORLINE",
c4d.DESC_REFUSE: "DESC_REFUSE",
c4d.DESC_PARENTID: "DESC_PARENTID",
c4d.DESC_CUSTOMGUI: "DESC_CUSTOMGUI",
c4d.DESC_COLUMNS: "DESC_COLUMNS",
c4d.DESC_LAYOUTGROUP: "DESC_LAYOUTGROUP",
c4d.DESC_REMOVEABLE: "DESC_REMOVEABLE",
c4d.DESC_GUIOPEN: "DESC_GUIOPEN",
c4d.DESC_EDITABLE: "DESC_EDITABLE",
c4d.DESC_MINSLIDER: "DESC_MINSLIDER",
c4d.DESC_MAXSLIDER: "DESC_MAXSLIDER",
c4d.DESC_GROUPSCALEV: "DESC_GROUPSCALEV",
c4d.DESC_SCALEH: "DESC_SCALEH",
c4d.DESC_LAYOUTVERSION: "DESC_LAYOUTVERSION",
c4d.DESC_ALIGNLEFT: "DESC_ALIGNLEFT",
c4d.DESC_FITH: "DESC_FITH",
c4d.DESC_NEWLINE: "DESC_NEWLINE",
c4d.DESC_TITLEBAR: "DESC_TITLEBAR",
c4d.DESC_CYCLEICONS: "DESC_CYCLEICONS",
c4d.DESC_CYCLESYMBOLS: "DESC_CYCLESYMBOLS",
c4d.DESC_PARENT_COLLAPSE: "DESC_PARENT_COLLAPSE",
c4d.DESC_FORBID_INLINE_FOLDING: "DESC_FORBID_INLINE_FOLDING",
c4d.DESC_FORBID_SCALING: "DESC_FORBID_SCALING",
c4d.DESC_UNIT_METER: "DESC_UNIT_METER",
c4d.DESC_ANGULAR_XYZ: "DESC_ANGULAR_XYZ",
c4d.DESC_INPORT: "DESC_INPORT",
c4d.DESC_OUTPORT: "DESC_OUTPORT",
c4d.DESC_STATICPORT: "DESC_STATICPORT",
c4d.DESC_NEEDCONNECTION: "DESC_NEEDCONNECTION",
c4d.DESC_MULTIPLE: "DESC_MULTIPLE",
c4d.DESC_PORTONLY: "DESC_PORTONLY",
c4d.DESC_CREATEPORT: "DESC_CREATEPORT",
c4d.DESC_PORTSMIN: "DESC_PORTSMIN",
c4d.DESC_PORTSMAX: "DESC_PORTSMAX",
c4d.DESC_NOTMOVABLE: "DESC_NOTMOVABLE",
c4d.DESC_EDITPORT: "DESC_EDITPORT",
c4d.DESC_ITERATOR: "DESC_ITERATOR",
c4d.DESC_PARENTMSG: "DESC_PARENTMSG",
c4d.DESC_MATEDNOTEXT: "DESC_MATEDNOTEXT",
c4d.DESC_COLUMNSMATED: "DESC_COLUMNSMATED",
c4d.DESC_SHADERLINKFLAG: "DESC_SHADERLINKFLAG",
c4d.DESC_NOGUISWITCH: "DESC_NOGUISWITCH",
c4d.DESC_COLORALWAYSLINEAR: "DESC_COLORALWAYSLINEAR",
c4d.DESC_HIDE_WHEN_INLINE: "DESC_HIDE_WHEN_INLINE",
c4d.DESC_MATERIALEDITOR_LEFTSIDE: "DESC_MATERIALEDITOR_LEFTSIDE",
c4d.DESC_CHANGED: "DESC_CHANGED",
c4d.DESC_HIDEINFIELDS: "DESC_HIDEINFIELDS",
c4d.DESC_SHOWINFIELDS: "DESC_SHOWINFIELDS",
c4d.DESC_FIELDCOLORCHANNEL: "DESC_FIELDCOLORCHANNEL",
c4d.DESC_FIELDDIRECTIONCHANNEL: "DESC_FIELDDIRECTIONCHANNEL",
c4d.DESC_FIELDVALUECHANNEL: "DESC_FIELDVALUECHANNEL",
c4d.DESC_FIELDROTATIONCHANNEL: "DESC_FIELDROTATIONCHANNEL",
c4d.DESC_NODEPORT: "DESC_NODEPORT",
c4d.DESC_REPLACECOMPLEXUI: "DESC_REPLACECOMPLEXUI",
c4d.DESC_REPLACE_HIDE: "DESC_REPLACE_HIDE",
c4d.DESC_RESOURCEPATH: "DESC_RESOURCEPATH",
c4d.DESC_RESOURCELINE: "DESC_RESOURCELINE",
c4d.DESC_TEMPDESCID: "DESC_TEMPDESCID",
c4d.DESC_IDENT: "DESC_IDENT",
c4d.DESC_IDENT_ORIGIN: "DESC_IDENT_ORIGIN",
c4d.DESC_DISABLELAYOUTSWITCH: "DESC_DISABLELAYOUTSWITCH",
c4d.DESC_UNIMPORTANTFORDEFAULTS: "DESC_UNIMPORTANTFORDEFAULTS",
}
op: c4d.BaseObject # The active object.
doc: c4d.documents.BaseDocument # The active document.
def main():
"""
"""
tag: c4d.BaseTag = doc.GetActiveTag()
if tag is None:
return
c4d.CallCommand(13957)
line: str = "{} = {}"
data: c4d.BaseContainer
for data, _, _ in tag.GetDescription(c4d.DESCFLAGS_DESC_NONE):
print ("\n" + ("-" * 100) + "\n")
for did, label in DESC_MAP.items():
value: typing.Any = data[did]
if value is None:
continue
if isinstance(value, c4d.BaseContainer):
print(line.format(label, ""))
for k, v in value:
print(f"\t{k}: {v}")
else:
print(line.format(label, value))
if __name__ == "__main__":
main()
Output:
[...]
----------------------------------------------------------------------------------------------------
DESC_NAME = foo.x
DESC_ANIMATE_MIX = foo.x
DESC_VERSION = 3
DESC_MIN = -0.7853981633974483
DESC_MAX = 0.7853981633974483
DESC_MINEX = 0
DESC_MAXEX = 0
DESC_STEP = 8.726646259971648e-05
DESC_ANIMATE = 1
DESC_UNIT = 1717856114
DESC_CUSTOMGUI = 1000489
DESC_MINSLIDER = -0.7853981633974483
DESC_MAXSLIDER = 0.7853981633974483
DESC_IDENT = ID_OFF_X
----------------------------------------------------------------------------------------------------
DESC_NAME = bar.y
DESC_ANIMATE_MIX = bar.y
DESC_VERSION = 3
DESC_MIN = -3.141592653589793
DESC_MAX = 3.141592653589793
DESC_MINEX = 0
DESC_MAXEX = 0
DESC_STEP = 8.726646259971648e-05
DESC_ANIMATE = 1
DESC_UNIT = 1717856114
DESC_CUSTOMGUI = 1000489
DESC_MINSLIDER = -3.141592653589793
DESC_MAXSLIDER = 3.141592653589793
DESC_IDENT = ID_OFF_Y
----------------------------------------------------------------------------------------------------
DESC_NAME = User Data
DESC_ANIMATE_MIX = User Data
DESC_DEFAULT = 1
DESC_IDENT = ID_USERDATA
----------------------------------------------------------------------------------------------------
DESC_NAME = data.x
DESC_ANIMATE_MIX = data.x
DESC_VERSION = 3
DESC_MIN = -3.141592653589793
DESC_MAX = 3.141592653589793
DESC_MINEX = 0
DESC_MAXEX = 0
DESC_STEP = 8.726646259971648e-05
DESC_ANIMATE = 1
DESC_UNIT = 1717856114
DESC_PARENTGROUP = (700, 5, 0)
DESC_CUSTOMGUI = 1000489
DESC_REMOVEABLE = 1
DESC_EDITABLE = 1
DESC_MINSLIDER = -3.141592653589793
DESC_MAXSLIDER = 3.141592653589793