Browse Source

Merge c76f395414 into 59f660a5f0

pull/335/merge
Patrick Dulebohn 2 years ago committed by GitHub
parent
commit
606ebcc267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      korman/properties/modifiers/gui.py
  2. 12
      korman/ui/modifiers/gui.py

26
korman/properties/modifiers/gui.py

@ -429,12 +429,20 @@ 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=True, default=False,
options=set()) options=set())
share_region = PointerProperty(name="Share Region", share_region = PointerProperty(name="Share Region",
description="Sets the share region in which the receiving avatar must stand", description="Sets the share region in which the receiving avatar must stand",
type=bpy.types.Object, type=bpy.types.Object,
poll=idprops.poll_mesh_objects) poll=idprops.poll_mesh_objects)
drc_stamp = BoolProperty(name="Stamped",
description="Is there a stamp on the left page of this Book?",
default=False,
options=set())
third_person = BoolProperty(name="Force Third Person",
description="Forces the camera into third person while Book is in use",
default=False,
options=set())
# -- Path of the Shell options -- # -- Path of the Shell options --
# Popup Appearance # Popup Appearance
@ -482,7 +490,11 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
else: else:
rgn_obj = self.clickable_region rgn_obj = self.clickable_region
if self.shareable: @property
def export_share_region(self) -> bool:
return self.shareable and self.link_type == "kOriginalBook"
if self.export_share_region:
if self.share_region is None: if self.share_region is None:
with utils.bmesh_object("{}_LinkingBook_ShareRgn".format(self.key_name)) as (share_region, bm): with utils.bmesh_object("{}_LinkingBook_ShareRgn".format(self.key_name)) as (share_region, bm):
# Generate a cube for the share region. # Generate a cube for the share region.
@ -680,6 +692,16 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
share.link_input(share_anim_stage, "stage", "stage_refs") share.link_input(share_anim_stage, "stage", "stage_refs")
share.link_output(linkingnode, "hosts", "shareBookSeek") share.link_output(linkingnode, "hosts", "shareBookSeek")
# Odds and Ends
stamped = nodes.new("PlasmaAttribBoolNode")
stamped.link_output(linkingnode, "pfm", "IsDRCStamped")
if not self.drc_stamp:
stamped.value = False
forcecam = nodes.new("PlasmaAttribBoolNode")
forcecam.link_output(linkingnode, "pfm", "ForceThirdPerson")
if self.third_person:
forcecam.value = True
def sanity_check(self): def sanity_check(self):
if self.clickable is None: if self.clickable is None:
raise ExportError("{}: Linking Book modifier requires a clickable!", self.id_data.name) raise ExportError("{}: Linking Book modifier requires a clickable!", self.id_data.name)

12
korman/ui/modifiers/gui.py

@ -95,15 +95,17 @@ def linkingbookmod(modifier, layout, context):
row_alert("age_name") row_alert("age_name")
if "pvMoul" in modifier.versions and modifier.link_type == "kOriginalBook":
layout.separator()
layout.prop(modifier, "shareable")
layout.prop(modifier, "share_region")
if "pvMoul" in modifier.versions: if "pvMoul" in modifier.versions:
if modifier.link_type == "kOriginalBook":
layout.separator()
layout.prop(modifier, "shareable")
if modifier.shareable:
layout.prop(modifier, "share_region")
layout.separator() layout.separator()
layout.prop(modifier, "link_destination") layout.prop(modifier, "link_destination")
layout.prop(modifier, "spawn_title") layout.prop(modifier, "spawn_title")
layout.prop(modifier, "drc_stamp")
layout.prop(modifier, "third_person")
layout.prop(modifier, "spawn_point") layout.prop(modifier, "spawn_point")
if "pvPots" in modifier.versions: if "pvPots" in modifier.versions:

Loading…
Cancel
Save