본문 바로가기

Life Insight/tools

연습 소스

728x90
obj = doc.GetActiveObject()
doc = c4d.documents.GetActiveDocument()
obj = doc.GetActiveObject()
name = obj.GetName()
type = obj.GetType()
points = obj.GetAllPoints()


import c4d

dpef run():
	o = doc.GetActiveObject()
	
	if o == None:
		return

	cv = o[c4d.ID_BASEOBJECT_VISIBILITY_EDIT]
	
	if cv == 2: # default 
		o[c4d.ID_BASEOBJECT_VISIBILITY_EDIT] = 0
	if cv == 0:
		o[c4d.ID_BASEOBJECT_VISIBILITY_EDIT] = 1
	if cv == 1:
		o[c4d.ID_BASEOBJECT_VISIBILITY_EDIT] = 2

if __name__ == '__main__':
	run()
728x90