Browse Source

More script fixes

Adjusts PointerProperty text, increases created share region size, and reorganizes where the share functions are on the modifier
pull/317/head
Patrick Dulebohn 2 years ago
parent
commit
7f0d64fce3
  1. 6
      korman/properties/modifiers/gui.py
  2. 8
      korman/ui/modifiers/gui.py

6
korman/properties/modifiers/gui.py

@ -431,8 +431,8 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
description="Enable the Book to be Shareable (MOUL private instance only)",
default=True,
options=set())
share_region = PointerProperty(name="Share Region (optional)",
description="Sets an alternate share region (optional)",
share_region = PointerProperty(name="Share Region",
description="Sets the share region in which the receiving avatar must stand",
type=bpy.types.Object,
poll=idprops.poll_mesh_objects)
@ -486,7 +486,7 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
if self.share_region is None:
with utils.bmesh_object("{}_LinkingBook_ShareRgn".format(self.key_name)) as (share_region, bm):
# Generate a cube for the share region.
bmesh.ops.create_cube(bm, size=(8.0))
bmesh.ops.create_cube(bm, size=(10.0))
share_region_offset = mathutils.Matrix.Translation(self.clickable.matrix_world.translation - share_region.matrix_world.translation)
bmesh.ops.transform(bm, matrix=share_region_offset, space=share_region.matrix_world, verts=bm.verts)
share_region.plasma_object.enabled = True

8
korman/ui/modifiers/gui.py

@ -85,18 +85,18 @@ def linkingbookmod(modifier, layout, context):
if "pvMoul" in modifier.versions:
row_alert("seek_point")
layout.prop(modifier, "anim_type")
layout.separator()
layout.prop(modifier, "link_type")
if modifier.link_type == "kOriginalBook":
layout.prop(modifier, "shareable")
layout.prop(modifier, "share_region")
row_alert("age_instance")
if modifier.link_type == "kChildAgeBook":
row_alert("age_parent")
if modifier.link_type == "kBasicLink":
row_alert("age_uuid")
if "pvMoul" in modifier.versions and modifier.link_type == "kOriginalBook":
layout.prop(modifier, "shareable")
layout.prop(modifier, "share_region")
row_alert("age_name")
if "pvMoul" in modifier.versions:

Loading…
Cancel
Save