更改后如何设置对象位置?

时间:2021-05-30 13:49:30

标签: python cinema-4d

我正在使用此代码获取对象的边界框:

import c4d

def main():
    obj = doc.GetActiveObject()
    #print(obj)
    boundingSize = obj.GetRad()
    #print(boundingSize.y)
    
    m = obj.GetMg()
    m.off.y = 0
    obj.SetMg(m)    
    #print(m.off.y) it is not working


if __name__ == '__main__':
    main()
    c4d.EventAdd()

当我使用 SetMg 重新设置位置时,它不起作用!!

0 个答案:

没有答案
相关问题