A font as a variable?

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

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 😞

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!