블렌더
블렌더 파이썬 따라잡기 - 패널추가 익히기
Cray Fall
2020. 8. 6. 23:49
블렌더 파이썬를 이용하면 이런 사용자 인터페이스를 추가할 수 있군요.
학습하는데 시간이 많이 소요되어서 나중에 정리할 예정입니다 :)
스크립트 공유합니다.
import bpy
class CrayPanel(bpy.types.Panel):
bl_label = "블렌더 파이썬의 패널 연습"
bl_idname = "SAMPLE_PT_LA"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
def draw(self, context):
self.layout.row().label(text="블렌더의 세계!", icon='WORLD_DATA')
self.layout.row().label(text="선택된 오브젝트는 " + context.object.name + "입니다.")
self.layout.row().prop(context.object, "name")
self.layout.row().operator("mesh.primitive_cube_add")
bpy.utils.register_class(CrayPanel)