PyPRP Developement Journal

Moderators: Trylon, Paradox

PyPRP Developement Journal

Postby Trylon » Sun Nov 18, 2007 11:58 pm

Shorah.

In light of paladin's lack of updating in about a year, I'll be taking over this section, as a PyPRP developement journal.

For starters, let's do a short recap of the latest changes:

The update of a few weeks ago does not seem to have many major changes. However, the internal support for materials, textures, layers and bitmaps has been totally reworked.

This means that you might run into some changes that you didn't expect, for example with the import of ages.
The first thing you willn otice is that PyPRP no longer puts a uv texture on every object. This was an intentional change, as there is now import support for materials, and it puts everything orderly under blenders material settings. It also supports multiple textures per object now.

Another under-the-hood update, but one which I hope will be expanded on in the future, is the addition of AlcScript.
(called that way, because "PyPRPScript" just wasn't as easily pronounced ;) ).
This is the feature that requires you to install PyYAML with the newest versions of the plugin.

AlcScript can be used in the exporting process to obtain extra settings for objects, that cannot be placed in any normal blender property. Up until now we always used logic properties for that, but editing them is extremely tedious work, and not quite flexible. AlcScript is meant to alleviate the use of logic properties.

It is implemented in a blender-internal text file called - how appropriately - "AlcScript". And it has the following structure:
Code: Select all
- <object name>
    type: [object | camera | etc...]

    <subset 1>:
        <property>: <value>
        <property>: <value>

        <subset 1a>:
            - <listitem1>:
                <property>: <value>
            - <listitem2>:
                <property>: <value>

    <subset 2>:
        <property>: <value>

- <object name>
    type: [object | camera | etc...]

    <subset 1>:
        <property>: <value>
        <property>: <value>


This is just a basic structure description, the items between "<" and ">" are generic describers, and should be replaced with the name of a subset, or an object.

An example of how I practically envision it's use in the future:
Fictional Example: (Not all used properties and subsets exist yet!)
Code: Select all
- GroundFloor:
    type: object

    physical:
        refriction: 4.5

    visual:
        lights:
            - sun1
            - IndoorLamp2

- GroundCam:
    type: camera

    brain:
        type: fixed

        transitions:
            - HallCamera1:
                cutto: false
                accel: 50
                decel: 60
                maxspeed: 30
            - SkyCam:
                cutto: true


Well, tha's about how AlcScript basically should work.
Currently only the camera support is implemented, and unfortunately, I couldn't access the source code while writing this post, so I had to do quite some guesswork in the above example.
Nevertheless, the principles behind the example are solid.

Until the the next post!

--Trylon
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: An Update on Not Updating

Postby Chacal » Mon Nov 19, 2007 2:00 pm

Do I understand correctly: Some properties specific to the Plasma engine can't be easily added inside Blender. Up to now you had to hack them directly into the prp file after exporting from Blender. Now we'll be able to use Alcscript for that.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2437
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: An Update on Not Updating

Postby Trylon » Mon Nov 19, 2007 2:22 pm

Well, that is the general plan :)
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: PyPRP Developement Journal

Postby Jojon » Mon Nov 19, 2007 3:11 pm

Trylon wrote:AlcScript can be used in the exporting process to obtain extra settings for objects, that cannot be placed in any normal blender property. Up until now we always used logic properties for that, but editing them is extremely tedious work, and not quite flexible. AlcScript is meant to alleviate the use of logic properties.
Ah, I was about to ask whether anybody was working on a script that would pop up a neat panel, with select boxes and stuff, for commonly used logic properties (for selected objects). Obviously you are miles ahead of anything /me might ask. :)
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am


Return to Scripting Journal

Who is online

Users browsing this forum: No registered users and 1 guest

cron