Page 1 of 2

Wiki Clickable Clarification

PostPosted: Wed Oct 15, 2008 10:57 pm
by J'Kla
In the Wiki entry "How to make an object clickable" there is some sections of Python code it is not specifically mentioned but I am assuming these bits do NOT go in the AlcScript file but are entered in the Python Script Panel?

If this is true then I will need to export the Python code to my test copy of UruCC so what do I need to export and where to?

Or is this handled automatically when I export?

Re: Wiki Clickable Clarification

PostPosted: Thu Oct 16, 2008 4:17 pm
by Robert The Rebuilder
You're partially correct, J'kla. The Python code does not go into the AlcScript text object; in fact, it doesn't go into Blender at all. It goes into an external Python file. The Wiki doesn't really have a good description of creating Python files, so I'll attempt to describe the process here.

[EDIT: Moved it to a new Wiki topic here.]

Re: Wiki Clickable Clarification

PostPosted: Thu Oct 16, 2008 9:44 pm
by J'Kla
Thanks I think that was going to be my next ask. :)

Ok I have had a quick look my only comment is in the line.

Before you do anything else, save this file. Choose File -> Save, then browse to the Python/src subdirectory of your URU installation and give it the same name as your class, e.g. MyAgeButton.py


At the moment my Uru installation has an empty src folder in the root of the Uru installation and no src sub directory in the Python folder so the line has two orders of confusion.

Re: Wiki Clickable Clarification

PostPosted: Fri Oct 17, 2008 5:35 am
by D'Lanor
The Python\src folder inside the Uru installation was probably chosen because it is a convenient location. In fact it does not matter where you put your Python source files because Uru does not use them. It only uses the compiled pak files.

Re: Wiki Clickable Clarification

PostPosted: Fri Oct 17, 2008 3:57 pm
by Robert The Rebuilder
J'Kla: part of installing PlasmaShop is to unpack your python.pak file - click here for instructions. This will create a src subdirectory of the Python directory, into which it will place all the Plasma python files you'll need for compiling your own Python file - it includes some of these files at the top.

Re: Wiki Clickable Clarification

PostPosted: Sat Oct 18, 2008 1:39 am
by J'Kla
I already have Python 2.5 installed to run blender do I still need to do the Python stuff I also already have Plasma shop installed I needed that to do the checksums for my Ahra Pahts Shell and the same goes for PRPTool

Re: Wiki Clickable Clarification

PostPosted: Sat Oct 18, 2008 6:30 am
by D'Lanor
Yes. And that is on of the reasons why I prefer UruPython, which does not need older Python versions installed like PlasmaShop does. A link for it can be found in the wiki.

On the other hand UruPython does not create a sample Python script for you (which PlasmaShop does wrong anyway, since it drops required commas). So you probably should install both.

Re: Wiki Clickable Clarification

PostPosted: Sun Oct 19, 2008 11:18 am
by diafero
One note for that "How to create a Python file" tutorial: Maybe it should state clearly that the name of every Python file should start with the name of the age it belongs to. Otherwise, we will get strange results with two ages having a "MyAgeButton.py"...

Re: Wiki Clickable Clarification

PostPosted: Sun Oct 19, 2008 11:41 am
by Paradox
Please also note: the file name must match the Python class name. As simple as it sounds, I had issues for weeks due to this.

Re: Wiki Clickable Clarification

PostPosted: Mon Oct 20, 2008 9:16 am
by Robert The Rebuilder
J'Kla: you will need to install Python 2.2.3, since that's the version used by Uru's Plasma engine.

D'Lanor wrote:On the other hand UruPython does not create a sample Python script for you (which PlasmaShop does wrong anyway, since it drops required commas).


I haven't had this problem when creating Python files via PlasmaShop; each file has compiled fine with Python 2.2.3. Do you have the latest version of PlasmaShop?