Skip to content

Commit

Permalink
Add DRC Stamp and Third Person Cam Functions to GUI
Browse files Browse the repository at this point in the history
Adds bool values for the stamp and third person cam portions of the xLinkingBookGUIPopup.py parts of the script (MOUL only)
  • Loading branch information
DoobesURU committed Jun 28, 2022
1 parent 9997b6a commit 0ee6ab6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
16 changes: 16 additions & 0 deletions korman/properties/modifiers/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -680,6 +688,14 @@ def _create_moul_nodes(self, clickable_object, nodes, linkingnode, age_name, clk
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)
Expand Down
12 changes: 7 additions & 5 deletions korman/ui/modifiers/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ def row_alert(prop_name, **kwargs):

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:
Expand Down

0 comments on commit 0ee6ab6

Please sign in to comment.