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

    Set Project Scale

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 271 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 20/01/2014 at 13:52, xxxxxxxx wrote:

      I'm creating a new document via newDoc = c4d.documents.BaseDocument() but instead of the new document using my default measuring system (inches), it is using centimeters.  I'm trying to change it but running into a bit of problem understanding the sdk documentation.  It looks like I should be able to set it using baseDocument.SetData(type, bc)  but I don't understand what they mean by "merge the base container for the specified settings".

      Any help or insight is appreciated.

      Here is what I am trying.

      import c4d
      from c4d import documents
        
      newDoc = c4d.documents.BaseDocument()
      projUnit = c4d.UnitScaleData()
      projUnit.SetUnitScale(1, c4d.DOCUMENT_UNIT_INCH)
      newDoc.SetData(c4d.DOCUMENT_DOCUNIT, projUnit)
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 20/01/2014 at 14:09, xxxxxxxx wrote:

        Hi .del,

        just use the bracket syntax. 🙂

        projUnit = c4d.UnitScaleData()
        projUnit.SetUnitScale(1, c4d.DOCUMENT_UNIT_INCH)
        doc[c4d.DOCUMENT_DOCUNIT] = projUnit
        

        Cheers,
        -Niklas

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

          On 20/01/2014 at 14:22, xxxxxxxx wrote:

          I tried several things that failed.  None of them were bracket access.  That's how I ended up at SetData.

          Thank you (again).

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