WorldContainer Color
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 10:53, xxxxxxxx wrote:
Hi,
where can i find the string identifiers for the interface color preferences in the world
container ? they seem to be in an 10000ish id range, but i couldn't find the string
identifiers in the ressource folder, nor any thread pointing me into the right direction.ps : i am aware of the GetColorRGB() methods.
thanks,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 11:26, xxxxxxxx wrote:
They're in the c4d_symbols.h file
path = Your cinema4d version\resource\c4d_symbols.hExample:
IDS_COLOR_TEXT_TAB_ACTIVE = 17449I got the ID number using V.S.
When .h files are opened in Visual Studio. The id number is shown when hovering the mouse over them.-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 12:08, xxxxxxxx wrote:
hm,
i found these too, should have mentioned that. however these do not work in conjunction with
the BaseContainer returned by c4d.GetWorldContainer(). I am / was also a bit confused by their
naming idS_SOMETHING, shouldn't it be idC_SOMETHING for the IDs, because the IDS prefix is
for interface strings ?could you provide a working example on how to use this ID to get the color vector ?
bc = c4d.GetWorldContainer() id = c4d.IDS_COLOR_TEXT_TAB_ACTIVE print bc[id]
this doesn't work, c4d cannot resolve the id.
bc = c4d.GetWorldContainer() print bc[17449]
this does work, but the content is none. which is not a suprise, because as i said in my first
post, i printed the WorldContainer to the console and the color vectors seem to range from
10007 to 10065.edit : i also tried to 'eyeball' mtach these ids to the colors in the dialog, some are machting,
other do not make any sense, they seem to be in a diffrent order than the colors in the dialog.thanks for your help,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 13:55, xxxxxxxx wrote:
I think MAXON changed the access to the prefs. somewhere around R12 or R13.
This an example how to change the Bubble help preference option:
import c4d from c4d import plugins def main() : bblhelp = plugins.FindPlugin(465001620, c4d.PLUGINTYPE_PREFS) #The Interface prefs heading bblhelp[c4d.PREF_INTERFACE_BUBBLE]=True #The show bubble help option if __name__=='__main__': main()
The #465001620 stands for the Interface heading. AFAIK they don't have text ID's yet.
So the next heading of prefs (Input Devices) will be 465001621...and so on.Knowing this. We can get into one of the three Scheme colors headings.
This example gets the Editor colors inside that section of the prefsimport c4d from c4d import plugins def main() : color = plugins.FindPlugin(465001640, c4d.PLUGINTYPE_PREFS) #The Editor Colors prefs heading print color #Now you have to find the ID's for the colors..Background, Film format, etc..I don't know where they are if __name__=='__main__': main()
I looked around for the color ID's but I couldn't find them.
They are buried in the C4D file system somewhere. But I don't know where yet.
I'd like to know where they are too.#Edit- I found them in ge_prepass.h. But they don't seem to work. No idea why.
-ScottA -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 16:10, xxxxxxxx wrote:
Originally posted by xxxxxxxx
import c4d from c4d import plugins def main() : color = plugins.FindPlugin(465001640, c4d.PLUGINTYPE_PREFS) #The Editor Colors prefs heading print color #Now you have to find the ID's for the colors..Background, Film format, etc..I don't know where they are if __name__=='__main__': main()
I looked around for the color ID's but I couldn't find them.
They are buried in the C4D file system somewhere. But I don't know where yet.
I'd like to know where they are too.#Edit- I found them in ge_prepass.h. But they don't seem to work. No idea why.
-ScottAGeListNode.GetData() returns for the plugin :
---------------------------------------------------------------------------------------------------- <c4d.BaseContainer object at 0x0000000012169D50> > id: 700, val: 10000050 > id: 701, val: 0
but i found the interface ids (ge_prepass contains the viewport ids, plus i am not sure if that
are actually ids, looks more like an enum for internal use).the interface color ids are defined at \resource\_api\c4d_colors.h quite obvious isn't it ^^
however these ids doesn't match the ids in the worldcontainer.edit:
pretty ugly, but it works, you can use alle the ids listed in c4d_colors.h with GetColorRGB()
colorContainer = gui.GeUserArea() myColor = colorContainer.GetColorRGB(c4d.COLOR_TEXT_DISABLED)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 18:48, xxxxxxxx wrote:
Originally posted by xxxxxxxx
i found the interface ids (ge_prepass contains the viewport ids, plus i am not sure if that
are actually ids, looks more like an enum for internal use).The defined ID's in the ge_prepass file are just the C++ way to create a constant variable.
It's sort of old fashioned. And I think it actually comes from the C language if I remember correctly.
It's just an old fashioned way to assign a constant value to a variable.
This is how to use them to change the view preferences.
Using this item from the ge_prepass.h file: #define VIEWCOLOR_C4DBACKGROUND 0BG = c4d.GetViewColor(c4d.VIEWCOLOR_C4DBACKGROUND) #Gets the current background color value print BG c4d.SetViewColor(c4d.VIEWCOLOR_C4DBACKGROUND,c4d.Vector(1,0,0)) #Changes the Background color to Red c4d.EventAdd()
#Note: The icon in the preferences will not reflect the changes until C4D is closed and re-launced
-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2012 at 22:23, xxxxxxxx wrote:
hey,
thanks for your reply, i do not want to sound rude or something, i am always eager to learn,
but just for clarification : i was just looking for the interface colors, or more specificly for
the disabled text color. so my problem is kind of solved with my last posting. not sure why you are
always talking about viewport stuff. meh, language barriers . i constantly feel misunderstood
in english speaking forums .merry christmas,
ferdinand -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/12/2012 at 08:26, xxxxxxxx wrote:
Nah. Not really a language problem.
It was just my misunderstanding of what you were trying to do.-ScottA