Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Weight Manager UI Not Updating Immediately After Locking Joints via API?

    Bugs
    windows 2024 python
    2
    3
    574
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      Oliver
      last edited by Oliver

      Hello everyone,
      
      I've encountered an issue where the Weight Manager UI doesn't update immediately after using the API to lock joints.
      
      Specifically, when I use the

      c4d.modules.character.CAWeightMgr.LockAllJoints(doc)
      

      or

      c4d.modules.character.CAWeightMgr.LockSelectedJoints(doc)
      

      functions, the joints are indeed locked internally, meaning I can no longer paint weights on them. However, the lock icon in the Weight Manager UI remains in the "unlocked" state, not reflecting the actual locked status. Even after switching windows or reopening the Weight Manager, the UI still shows them as unlocked.
      
      I've tried calling c4d.EventAdd() after the lock operation, as well as CAWeightMgr.SetDirty(doc) and CAWeightMgr.Update(doc) before c4d.EventAdd(), but the UI still doesn't refresh to show the correct locked state.

      Is there a specific method or command to force the Weight Manager UI to instantly update its display of the joint lock status?

      Any insights or solutions would be greatly appreciated.
      
      Thank you!

      import c4d
      from c4d.modules.character import CAWeightMgr
      CAWeightMgr.LockAllJoints(doc) # lock all joints
      c4d.EventAdd()
      

      52153ca34d0b53b4b8c993c458262c3.png

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @Oliver
        last edited by ferdinand

        Hey @Oliver,

        Thank you for reaching out to us. This is a known bug, but currently only listed in our internal tracker as ITEM#249775 CAWeightMgr.UnlockAllJoints/LockSelectedJoints locked icon do not refresh. I have moved this topic into bugs, and gave the internal issue a little nudge.

        There is unfortunately no workaround for you, as this is not just an update issue, i.e., closing and reopening the Weight Manager won't help and deselecting and reselecting bones will neither.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        O 1 Reply Last reply Reply Quote 0
        • ferdinandF ferdinand moved this topic from Cinema 4D SDK on
        • O
          Oliver @ferdinand
          last edited by

          @ferdinand Got it, thanks for the heads-up!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post