How to allocate a gradient in Python?
-
On 10/06/2013 at 00:12, xxxxxxxx wrote:
The symbols file is is needed because it is part of the resource associated with a plugin or more
specifically its look up table the resource parser is using to identify certain elements.In python description ids are imported properly(automatically) from the symbols file, everything
else - custom ids, dialog ids is not. The reason ? Only god knows why. You have either to copy
the values or write a little parser for the symbols file which does autoimport its members to your
project.The downside of auto importing - if you are using an IDE, it won't know your symbols constants
anymore, so will loose the autocomplete feature on these. That is why I personally went back
to simply copy pasting the symbols file. With a little macro you can make it one press of a button.edit : You could of course write an autoimporter that doesn't work at runtime, but (over)writes
a python symbols definition py(c) file, but doing that properly will be a bit more work. as you
will have to analyze existing code in the file and so on. -
On 10/06/2013 at 00:44, xxxxxxxx wrote:
Originally posted by xxxxxxxx
In python description ids are imported properly(automatically) from the symbols file, everything
else - custom ids, dialog ids is not. The reason ? Only god knows why. You have either to copy
the values or write a little parser for the symbols file which does autoimport its members to your
project.https://github.com/NiklasRosenstein/c4dtools#example-code
c4dtools does this for you, and it also allows parsing the description resources so you don't have to
fuzz with the symbolcache. Well, if you're using an IDE, you won't have the symbols in the auto-
ompletion, but you could also write a script that parses the resource symbols and creates an
importable Python file that contains the resources.