1. Adding the ability to customize display, scale (size), shortcuts to the DebugConsole class. 2. Adding a function to utils.py to get Debug Console settings from Render: Armory. 3. Added Debug Console settings to the Armory Project interface: - Enable (default value - False); - Position (Left, Center, Right, default value - Right); - Scale Console (from 0.3 to 10); - Visible. 4. Added transfer of Debug Console settings to exporter.py. 5. Added logical nodes to control DebugConsole while the application is running.
26 lines
930 B
Python
26 lines
930 B
Python
from arm.logicnode.arm_nodes import *
|
|
|
|
class SetDebugConsoleSettings(ArmLogicTreeNode):
|
|
"""Set Debug Console Settings"""
|
|
bl_idname = 'LNSetDebugConsoleSettings'
|
|
bl_label = 'Set Debug Console Settings'
|
|
arm_version = 1
|
|
|
|
property0: EnumProperty(
|
|
items = [('Left', 'Left', 'Left'),
|
|
('Center', 'Center', 'Center'),
|
|
('Right', 'Right', 'Right')],
|
|
name='', default='Right')
|
|
|
|
def init(self, context):
|
|
super(SetDebugConsoleSettings, self).init(context)
|
|
self.add_input('ArmNodeSocketAction', 'In')
|
|
self.add_input('NodeSocketBool', 'Visible')
|
|
self.add_input('NodeSocketFloat', 'Scale')
|
|
self.inputs[-1].default_value = 1.0
|
|
self.add_output('ArmNodeSocketAction', 'Out')
|
|
|
|
def draw_buttons(self, context, layout):
|
|
layout.prop(self, 'property0')
|
|
|
|
add_node(SetDebugConsoleSettings, category=PKG_AS_CATEGORY) |