Browse Source

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)
pull/335/head
Patrick Dulebohn 2 years ago
parent
commit
25ebf581cd
  1. 16
      korman/properties/modifiers/gui.py
  2. 12
      korman/ui/modifiers/gui.py

16
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)

12
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:

Loading…
Cancel
Save