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

    A font as a variable?

    PYTHON Development
    0
    3
    516
    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
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 20/05/2011 at 00:55, xxxxxxxx wrote:

      I'm having success having many pytags read custom user data from a single controller node, thanks totally to forum help, but the one variable I can't seem to get from one place to another is a font setting.

      My goal is to have a main controller node where I can set a font, and have other pytags on other nodes read and use that font selection.

      I can set up a custom user data field to be a font selection, but I'm having trouble getting the other pytags to read that selection and use that font on its affected object.

      Is there a trick to dealing with fonts? I would like to avoid just having one pytag set all the fonts in a scene, for blah blah talkie reasons I'd like to have individual pytags just act on the objects they're assigned to... if possible. Thanks -- Alex

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 20/05/2011 at 07:12, xxxxxxxx wrote:

        Add a Font-Userdata to an Object and try the following code.

        >>> from c4d        import ID_USERDATA  
        \>>> from c4d.gui    import MessageDialog        as MsgDlg  
        \>>> from sys        import exc_info  
        \>>> try:  
                print op[ID_USERDATA, 1]  
        \>>> except:  
                MsgDlg(str(exc_info()))  
        \>>> <type 'exceptions.AttributeError'>  
            AttributeError('Parameter value not accessible (object unknown in Python)',)  
            <traceback object at 0x0000000011B4FE88>
        

        Seem's like fontobjects are not implemented in python 😞

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 20/05/2011 at 18:21, xxxxxxxx wrote:

          I wasn't able to try this today, but tonight or tomorrow. Again, thanks for the help!

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