Browse Source

Various fixes per Hoikas' suggestions

pull/317/head
Patrick Dulebohn 3 years ago
parent
commit
4cee3d6876
  1. 19
      korman/properties/modifiers/gui.py
  2. 2
      korman/ui/modifiers/gui.py

19
korman/properties/modifiers/gui.py

@ -429,12 +429,12 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
poll=idprops.poll_mesh_objects) poll=idprops.poll_mesh_objects)
shareable = BoolProperty(name="Shareable", shareable = BoolProperty(name="Shareable",
description="Enable the Book to be Shareable (MOUL private instance only)", description="Enable the Book to be Shareable (MOUL private instance only)",
default=False, default=True,
options=set()) options=set())
shr_region = PointerProperty(name="Share Region (optional)", share_region = PointerProperty(name="Share Region (optional)",
description="Sets an alternate share region (optional)", description="Sets an alternate share region (optional)",
type=bpy.types.Object, type=bpy.types.Object,
poll=idprops.poll_mesh_objects) poll=idprops.poll_mesh_objects)
# -- Path of the Shell options -- # -- Path of the Shell options --
# Popup Appearance # Popup Appearance
@ -643,17 +643,16 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
# Share MSB # Share MSB
if self.shareable: if self.shareable:
# Region # Region
share_region = nodes.new("PlasmaVolumeSensorNode") share_region = nodes.new("PlasmaVolumeSensorNode")
if self.shr_region is None: if self.share_region is None:
share_region.region_object = clk_region share_region.region_object = clk_region
else: else:
share_region.region_object = self.shr_region share_region.region_object = self.share_region
share_region.bounds = "hull"
for i in share_region.inputs: for i in share_region.inputs:
i.allow = True i.allow = True
share_region.link_output(linkingnode, "satisfies", "shareRegion") share_region.link_output(linkingnode, "satisfies", "shareRegion")
# MSB Behavior # MSB Behavior
share_seek = nodes.new("PlasmaSeekTargetNode") share_seek = nodes.new("PlasmaSeekTargetNode")
share_seek.target = self.seek_point share_seek.target = self.seek_point

2
korman/ui/modifiers/gui.py

@ -90,7 +90,7 @@ def linkingbookmod(modifier, layout, context):
layout.prop(modifier, "link_type") layout.prop(modifier, "link_type")
if modifier.link_type == "kOriginalBook": if modifier.link_type == "kOriginalBook":
layout.prop(modifier, "shareable") layout.prop(modifier, "shareable")
layout.prop(modifier, "shr_region") layout.prop(modifier, "share_region")
row_alert("age_instance") row_alert("age_instance")
if modifier.link_type == "kChildAgeBook": if modifier.link_type == "kChildAgeBook":
row_alert("age_parent") row_alert("age_parent")

Loading…
Cancel
Save