Set Project Scale



  • 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)
    


  • 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



  • 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).


Log in to reply