I'm trying to use a PythonFileMod parameter reference to an object in another page:
Code: Select all
veryclickycube:
logic:
modifiers:
- name: cubedialogopenmod
cursor: poised
flags:
- localelement
conditions:
- type: activator
activators:
- type: picking
actions:
- type: pythonfile
ref: $PythDialog
actions:
- type: pythonfile
tag: PythDialog
pythonfile:
file: myOwnGuiTest
parameters:
- type: responder
ref: respondermod:animstartresp
- type: guidialog
ref: 0098:guiTestCam@leftGUI # <-- look here
My problem is: When exporting my age with PyPRP a new (empty) GUI Dialog Mod object is created in the same page in which the Python File Mod is located, i.e. the object in the other page is actually not being referenced.
I already did some digging in the PyPRP code and found this piece of code: (from ScriptRefParser.RefString_FindCreate in prp_RefParser.py)
Code: Select all
# Try to find the page referenced...
# If not possible, we default back to the current page
if not keyinfo["pagename"] is None:
page=resmgr.findPrp(str(keyinfo["pagename"]))
if page is None:
page = self.page
else:
page = self.page
However, resmgr.findPrp(str(keyinfo["pagename"])) returns a correct value, so the code in the if block followed by this line doesn't get executed. I therefore came to the conclusion that the problem must lie somewhere in page.find(). I wasn't able to find the exact cause of the problem yet though. Is there anybody here who might be able to point me into the right direction to solve that problem?
Cheers,
The.Modificator