2017-11-26 23:00:00 +01:00
|
|
|
import bpy
|
|
|
|
from bpy.props import *
|
|
|
|
from bpy.types import Node, NodeSocket
|
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2017-11-26 23:07:48 +01:00
|
|
|
class ClearParentNode(Node, ArmLogicTreeNode):
|
|
|
|
'''Clear parent node'''
|
|
|
|
bl_idname = 'LNClearParentNode'
|
|
|
|
bl_label = 'Clear Parent'
|
2018-12-18 23:48:38 +01:00
|
|
|
bl_icon = 'QUESTION'
|
2017-11-26 23:00:00 +01:00
|
|
|
|
|
|
|
def init(self, context):
|
|
|
|
self.inputs.new('ArmNodeSocketAction', 'In')
|
|
|
|
self.inputs.new('ArmNodeSocketObject', 'Object')
|
|
|
|
self.inputs.new('NodeSocketBool', 'Keep Transform')
|
|
|
|
self.inputs[-1].default_value = True
|
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Out')
|
|
|
|
|
2017-11-26 23:07:48 +01:00
|
|
|
add_node(ClearParentNode, category='Action')
|