DESC_EDITABLE

On 27/11/2013 at 04:36, xxxxxxxx wrote:

Hello,

I am trying to find out how to disable userdata (to grey the field out/disable it)

I was able to find a script that hides userdata

import c4d
from c4d import gui

def main() :
    obj=op.GetObject()
    UD = obj.GetUserDataContainer()
    for descId, container in UD:
        if descId[1].id == 1:
            if obj[c4d.ID_USERDATA,2] == 0:
                container[c4d.DESC_HIDE] = True
                obj.SetUserDataContainer(descId, container)

if obj[c4d.ID_USERDATA,2] != 0:
                container[c4d.DESC_HIDE] = False
                obj.SetUserDataContainer(descId, container)

I tried replacing DESC_HIDE with DESC_EDITABLE to disable the userdata, but that doesn't seems to work

Any help can be offered ?!

Thanks,

On 09/12/2013 at 03:38, xxxxxxxx wrote:

anyone can help ?!

On 09/12/2013 at 10:17, xxxxxxxx wrote:

UserData do not support all description features, I guess this is another case. If you think
of GetDEnabling and how it does work it does make sense for me.

Happy rendering,
Ferdinand

On 10/12/2013 at 01:56, xxxxxxxx wrote:

Setting the editable flag for User Data fields is not possible.

Best,
-Niklas