forked from LeenkxTeam/LNXSDK
41 lines
1.7 KiB
Python
41 lines
1.7 KiB
Python
from lnx.logicnode.lnx_nodes import *
|
|
|
|
class GetObjectGeomNode(LnxLogicTreeNode):
|
|
"""Returns the vertex geometry info of the given object and the vertex groups info.
|
|
|
|
@input Object: object geometry to retrieve.
|
|
|
|
@output Vertices Positions: an array with the vertices positions.
|
|
@output Vertices Normals: an array with vertices normals directions.
|
|
@output Vertices Indices: an array with vertices indices.
|
|
@output Vertices Material Indices: an array with material indices per vertex.
|
|
@output Vertices Vertices Face Indices: an array with face index per vertex.
|
|
@output Vertex Groups Maps: maps with vertex group names and vertices positions.
|
|
@output Vertex Groups Names: an array with the names of the vertex gruops.
|
|
|
|
"""
|
|
|
|
bl_idname = 'LNGetObjectGeomNode'
|
|
bl_label = 'Get Object Geometry'
|
|
lnx_section = 'relations'
|
|
lnx_version = 1
|
|
|
|
property0: HaxeEnumProperty(
|
|
'property0',
|
|
items = [('Local', 'Local', 'Local'),
|
|
('Global', 'Global', 'Global')],
|
|
name='', default='Local', update='')
|
|
|
|
def lnx_init(self, context):
|
|
self.add_input('LnxNodeSocketObject', 'Object')
|
|
|
|
self.add_output('LnxNodeSocketArray', 'Vertices Positions')
|
|
self.add_output('LnxNodeSocketArray', 'Vertices Normals')
|
|
self.add_output('LnxNodeSocketArray', 'Vertices Indices')
|
|
self.add_output('LnxNodeSocketArray', 'Vertices Material Indices')
|
|
self.add_output('LnxNodeSocketArray', 'Vertices Face Indices')
|
|
self.add_output('LnxDynamicSocket', 'Vertex Groups Map')
|
|
self.add_output('LnxNodeSocketArray', 'Vertex Groups Names')
|
|
|
|
def draw_buttons(self, context, layout):
|
|
layout.prop(self, 'property0') |