Access to the graphic preferences

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 06 June 2013   #1
Access to the graphic preferences

Hi everyone,

I am trying to get access to the parameters in the graphic preferences window (hope this is the right word in English) via python. So I looked up the code in the phyton SKD, but I am not completely understanding it. I am still at the beginning with python.

So let's say I want to get access to the opacity and change the value. I thought that I have to use this command

Vorne[c4d.BASEDRAW_DATA_TINTBORDER_OPACITY]

Now the thing is, that Vorne, which is my front perspective is not working. I am getting an error line, saying NameError: global name "Vorne" is not defined. So it makes sense to me, that I have to define it first, that Vorne is my front perspective, but how to do it. I don't find the command for the front perspective in the SKD. So is it even possible or do I have to do the whole thing with COFFEE?

Would be great to get some help and thank you very much

Anna
 
Old 06 June 2013   #2
Hi Anna!

A viewport window is represented by a BaseDraw instance. You can get a BaseDraw by index
from a document via doc.GetBaseDraw(index). The number of available BaseDraw's can be
retrieved via doc.GetBaseDrawCount(). Iterate over all available BaseDraw's and search for
the one with the front perspective.

Best,
-Niklas
__________________
Cinema 4D Plugin Developer
niklasrosenstein.com/ | Freebies | Plugins
 
Old 06 June 2013   #3
Thanks a lot Niklas, it is working

Anna
 
Old 06 June 2013   #4
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:08 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.