Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    Subdivision Surface Weight Tag

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 352 Views
    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.
    • H Offline
      Helper
      last edited by

      On 19/05/2014 at 23:06, xxxxxxxx wrote:

      I'm creating a plane (polygon with 4 points) and making it a child of a Subdivision Surface.
      I'm then adding two tags:

      uvw tag:  c4d.BaseTag(c4d.Tuvw)
      and
      Subdivision Surface Weight:  c4d.BaseTag(c4d.Tsds)

      I have two problems.
      C4D pops a message box that says "Tag 5671 not in sync." when you try to do something with the plane.  That is the uvw tag.  If I drag the tag around in the object browser, the problem goes away.
      How do you make the tag 'in sync' in python.

      Second problem:
      I need to set the vertex weights of the 4 points for the Subdivision Surface.
      In the viewport, you select the vertices and hold down 'period' and drag left & right to set them.
      How do you set those weights with python?

      Thanks

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 20/05/2014 at 02:27, xxxxxxxx wrote:

        Hello,

        I can answer you for the first one.

        UVW Tag is a Variable Tag, you add it with MakeVariableTag()

        polycount = op.GetPolygonCount()  
        uvw = op.MakeVariableTag(c4d.Tuvw, polycount)
        

        More info in the doc :
        [URL-REMOVED]


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 20/05/2014 at 12:08, xxxxxxxx wrote:

          César,

          Thanks that worked.

          For some reason this method creates a tag that is not 'in sync' with the object properly.
          uvw_tag = c4d.BaseTag(c4d.Tuvw)
          obj.InsertTag(uvw_tag)

          Now for the second problem.
          Does anyone know how to set the vertex weights from python?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 05/06/2014 at 20:01, xxxxxxxx wrote:

            I was told by Maxon that this can't be done currently.
            This feature has now been put on request to the Maxon devs.

            I'm loading a plane with tags from a .c4d file to achieve the same thing for now.

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