From 25ebf581cdbc31b55bd955a574eb39a4c34f9797 Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn Date: Tue, 28 Jun 2022 16:02:04 -0400 Subject: [PATCH] Add DRC Stamp and Third Person Cam Functions to GUI Adds bool values for the stamp and third person cam portions of the xLinkingBookGUIPopup.py parts of the script (MOUL only) --- korman/properties/modifiers/gui.py | 16 ++++++++++++++++ korman/ui/modifiers/gui.py | 12 +++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/korman/properties/modifiers/gui.py b/korman/properties/modifiers/gui.py index 4eefec2..2950226 100644 --- a/korman/properties/modifiers/gui.py +++ b/korman/properties/modifiers/gui.py @@ -435,6 +435,14 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz description="Sets the share region in which the receiving avatar must stand", type=bpy.types.Object, poll=idprops.poll_mesh_objects) + drc_stamp = BoolProperty(name="DRC Stamped", + description="Did the DRC stamp 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 -- # Popup Appearance @@ -680,6 +688,14 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz share.link_input(share_anim_stage, "stage", "stage_refs") share.link_output(linkingnode, "hosts", "shareBookSeek") + # Odds and Ends + stamped = nodes.new("PlasmaAttribBoolNode") + stamped.link_output(linkingnode, "pfm", "IsDRCStamped") + stamped.value = self.drc_stamp + forcecam = nodes.new("PlasmaAttribBoolNode") + forcecam.link_output(linkingnode, "pfm", "ForceThirdPerson") + forcecam.value = self.third_person + def sanity_check(self): if self.clickable is None: raise ExportError("{}: Linking Book modifier requires a clickable!", self.id_data.name) diff --git a/korman/ui/modifiers/gui.py b/korman/ui/modifiers/gui.py index cf462c3..e16cad1 100644 --- a/korman/ui/modifiers/gui.py +++ b/korman/ui/modifiers/gui.py @@ -95,15 +95,17 @@ def linkingbookmod(modifier, layout, context): 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 modifier.link_type == "kOriginalBook": + layout.separator() + layout.prop(modifier, "shareable") + if modifier.shareable: + layout.prop(modifier, "share_region") layout.separator() layout.prop(modifier, "link_destination") layout.prop(modifier, "spawn_title") + layout.prop(modifier, "drc_stamp") + layout.prop(modifier, "third_person") layout.prop(modifier, "spawn_point") if "pvPots" in modifier.versions: