c4d_symbols.h Parser for Py4D


#1

Header File parser for Py4D - BETA
- - - - - - - - - - - - - -

I was sick including the ID's for a dialog created in ResEdit myself into
Python. Therefore I wrote a Header File parser. It will only analyze an
[i]enum[/i] statement.

First, download the package below and copy the folder to your Py4D library.
In your plugin, use this code to parse the [i]c4d_symbols.h[/i] and insert
the ID's into the global scope.

    from	HeaderFileParser		import parse
    from	os.path				import join, abspath, dirname
    
    parse(
    	join(
    		dirname( abspath(__file__)),
    		"res",
    		"c4d_symbols.h",
    	),
    	globals(),
    )
You can now use the ID's defined in [i]c4d_symbols.h[/i] in your Plugin.

Remember, this is still BETA. If any problems occure, please report it !
As this is still BETA, you might only use this while you are still
developing your plugin and your GUI might change.

[HeaderFileParser_BETA_0.9](http://www.mediafire.com/?minu8gndy651ju5)

Cheers,
Niklas

#2

Thanks Niklas.
I’m still a bit behind in the Py department for Cinema so this
can only be a good effort!

Cheers
Lennart


#3

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.