본문 바로가기

Code/cinema4d & 3dsmax

(21)
파이썬이 아닌 maxscript 소스 무슨 소스인지는 .. 기억이 안나고 그냥 바탕화면에 있길래 백업용으로 올려둠 transform 위치 : pos (position을 줄인 단어입니다.) 회전 : rotation 크기 : scale move 상대이동 mypot1 = teapot() --create a teapot fn whendeleted = --define a callback function ( local deletedobjects = callbacks.notificationParam() format "Callback: %\n" deletedobjects -- This will printevery object that was deleted. -- By this point, the object isstillattached to it's pa..
연습 소스 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 c..
[3dsMax Python] GUI with PySide2 Save file with file explorer 예전에 했던건데 나중에 정리해야겠다 from PySide2.QtWidgets import QApplication, QFileDialog from PySide2 import QtWidgets, QtGui, QtCore options = QFileDialog.Options() options = QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getSaveFileName( None,"Save warning txt: input txt file name", 'D:\\Clouds\\PROJECTS\\_COMMON\\_EQM\\', "All Files (*);;TEXT Files (*.txt)", options..
스크립트 기본 이름설정 하는법 주석으로 이름을 지정하면 이름과 설명이 됩니다. developers.maxon.net/docs/Cinema4DPythonSDK/html/manuals/introduction/python_script_manager.html Python Script Manager — Cinema 4D SDK 23.110 documentation When an object, tag, shader, or even a parameter is dragged and dropped into the script manager, a place holder variable named as the element is created. Since this variable is assigned to nothing in the cu..
baseContainer에 대해 그냥 데이터 저장하는 객체인데 c4d에서 사용되는 객체입니다. 여기에 값을 저장해서 len도 찍을수 있고, 저장해서 다른 함수로 넘길수도 있습니다. 저는 다른 스크립트로 값을 넘길때 baseContainer를 사용했습니다. developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d/BaseContainer/index.html?highlight=basecontainer c4d.BaseContainer — Cinema 4D SDK 23.110 documentation Once you’ve set a container value using one type you must neither try to access it using another type, nor o..
[c4dpython] How to use excel in c4d python C:\Program Files\MAXON\Cinema 4D R19\resource\modules\python\Python.win64.framework\Lib\site-packages unzip xlrd and xlsxwriter
[3dsMax python] Start up C:\Program Files\Autodesk\3ds Max 2018\scripts\Startup
[c4dpython] Tag Tag 태그 가져오는 코드 tags = object.GetTags() 특정 태그만 가져오는 건 아래처럼 하면 됩니다. doc = c4d.documents.GetActiveDocument() op = doc.GetActiveObject() wt = op.GetTag(c4d.Tvertexmap)