Skip to content

Commit

Permalink
Merge pull request #46 from lordloki/remove_components
Browse files Browse the repository at this point in the history
Remove Python Components from Logic Node Editor
  • Loading branch information
IzaZed authored Mar 4, 2021
2 parents 64f5f85 + c15625c commit c417816
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
1 change: 0 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ def draw(self, context):
ui.BGE_PT_HelpPanel,
ui.BGE_PT_LogicNodeSettingsObject,
ui.BGE_PT_LogicTreeOptions,
ui.BGE_PT_GameComponentPanel,
ui.BGE_PT_GamePropertyPanel3DView,
ui.BGE_PT_PropertiesPanelObject,
ui.BGE_PT_LogicTreeGroups
Expand Down
39 changes: 0 additions & 39 deletions ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,45 +57,6 @@ class BGEGroupName(bpy.types.PropertyGroup):
enabled: bpy.props.BoolProperty()


class BGE_PT_GameComponentPanel(bpy.types.Panel):
bl_label = "Components"
bl_space_type = "NODE_EDITOR"
bl_region_type = "UI"
bl_category = "Item"
# module = bpy.StringProperty()

@classmethod
def poll(cls, context):
ob = context.active_object
return ob and ob.name

def draw(self, context):
layout = self.layout

ob = context.active_object
game = ob.game

row = layout.row()
row.operator("logic.python_component_register", text="Register", icon="PLUS")
row.operator("logic.python_component_create", text="Create", icon="PLUS")

for i, c in enumerate(game.components):
box = layout.box()
row = box.row()
row.prop(c, "show_expanded", text="", emboss=False)
row.label(text=c.name)
row.operator("logic.python_component_reload", text="", icon='RECOVER_LAST').index = i
row.operator("logic.python_component_remove", text="", icon='X').index = i

if c.show_expanded and len(c.properties) > 0:
box = box.box()
for prop in c.properties:
row = box.row()
row.label(text=prop.name)
col = row.column()
col.prop(prop, "value", text="")


class BGE_PT_GamePropertyPanel(bpy.types.Panel):
bl_label = "Object Properties"
bl_space_type = "NODE_EDITOR"
Expand Down

0 comments on commit c417816

Please sign in to comment.