@m_adam said in c4d.CallButton(myTagPSR,c4d.ID_CA_CONSTRAINT_TAG_PSR_ADD):
Thanks for this info. In de future I will try to do so. I my attempt to make it a small example I find my error. The command doc.InsertObject() was below the AIM in my script. For the AIM it is no problem but for the callbutton it is.
I hoped it was something small, because the script I made is 700 rules long and is connected to a cinema file. I put the files to this reply. I work in version S22.123
If you open the cinema file you can run the script. I changed the PSR is changed in a AIM, and the command that is not working is in rule 245. In the tree the aim can be found on "Center Mid 02". I hope this gives something where you can find the problem.
Thanks for you reply
Sheaves of python.c4d [0_1600762843324_PY Sheaves9.py](Uploading 100%)
I try to add a PSR constraint with 2 targets, and this I do with de callbutton. This is in a loop. But somehow I can't find what I doing wrong. Do I have to add something before I do a callbutton command?
#Add PSR constraint to CenterMid
myTagPSR = ListCenterMid[Loop3].MakeTag(1019364)
myTagPSR[c4d.ID_BASELIST_NAME] = "PSR "
myTagPSR[c4d.ID_CA_CONSTRAINT_TAG_PSR] = True
myTagPSR = ListCenterIn[Loop3]
myTagPSR = ListCenterOut[Loop3]