Browse Source

Optional Share region

Adds a field for an optional share region (uses click region if blank).
pull/317/head
Patrick Dulebohn 3 years ago
parent
commit
528f381d32
  1. 9
      korman/properties/modifiers/gui.py
  2. 1
      korman/ui/modifiers/gui.py

9
korman/properties/modifiers/gui.py

@ -431,6 +431,10 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
description="Enable the Book to be Shareable (MOUL private instance only)",
default=False,
options=set())
shr_region = PointerProperty(name="Share Region (optional)",
description="Sets an alternate share region (optional)",
type=bpy.types.Object,
poll=idprops.poll_mesh_objects)
# -- Path of the Shell options --
# Popup Appearance
@ -641,7 +645,10 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
if self.shareable:
# Region
share_region = nodes.new("PlasmaVolumeSensorNode")
share_region.region_object = clk_region
if self.shr_region is None:
share_region.region_object = clk_region
else:
share_region.region_object = self.shr_region
share_region.bounds = "hull"
for i in share_region.inputs:
i.allow = True

1
korman/ui/modifiers/gui.py

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

Loading…
Cancel
Save