On 09/04/2013 at 12:27, xxxxxxxx wrote:
And Hi again ;)
Hmmm... either I am not getting it or something weird is going on, because if I run your code while an XRef object is selected, the offset does not change. (By the way, there is one bracket too many in your script that caused it to throw an error initially) Have you tried the script yourself? Does it work for you?
I modified your code a bit to test some things. When i put in some lines to change some other parameters, those lines seem to work fine. See the comments in the code. Strange...
Thanks very much for taking the time to help me though! Cheers!
import c4d
def main() :
obj = doc.GetActiveObject()
#this doesn't seem to do anything:
obj[c4d.ID_CA_XREF_GENERATOR] = True
obj[c4d.ID_CA_XREF_OFFSET] = c4d.BaseTime(10)
#this, however, works fine:
obj[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] = 10
obj[c4d.ID_CA_XREF_SHOWOBJECTS] = False
c4d.EventAdd()
if __name__=='__main__':
main()