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 3 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)", description="Enable the Book to be Shareable (MOUL private instance only)",
default=True, default=True,
options=set()) options=set())
share_region = PointerProperty(name="Share Region (optional)", share_region = PointerProperty(name="Share Region",
description="Sets an alternate share region (optional)", 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)
@ -486,7 +486,7 @@ class PlasmaLinkingBookModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz
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.
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) 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) bmesh.ops.transform(bm, matrix=share_region_offset, space=share_region.matrix_world, verts=bm.verts)
share_region.plasma_object.enabled = True 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: if "pvMoul" in modifier.versions:
row_alert("seek_point") row_alert("seek_point")
layout.prop(modifier, "anim_type") layout.prop(modifier, "anim_type")
layout.separator() layout.separator()
layout.prop(modifier, "link_type") layout.prop(modifier, "link_type")
if modifier.link_type == "kOriginalBook":
layout.prop(modifier, "shareable")
layout.prop(modifier, "share_region")
row_alert("age_instance") row_alert("age_instance")
if modifier.link_type == "kChildAgeBook": if modifier.link_type == "kChildAgeBook":
row_alert("age_parent") row_alert("age_parent")
if modifier.link_type == "kBasicLink": if modifier.link_type == "kBasicLink":
row_alert("age_uuid") 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") row_alert("age_name")
if "pvMoul" in modifier.versions: if "pvMoul" in modifier.versions:

Loading…
Cancel
Save