Page 1 of 1

Changing SDL Variables

PostPosted: Mon Jun 16, 2008 1:10 am
by GPNMilano
Hey out there. I was wondering if someone out there in programming land could help me. I need a sample python script that works similiar to the yeesha pages (clicking the object turns a vis off and back on).

EDIT: To further explain. Rather than a single object, I want to take a group of objects in blender. Make them all into one SDL Variable. But have them remain on the same PRP as the rest of the objects in that page. Then have a python script that changes the SDL variable for that vis and toggles the multiple objects, on and off.

Re: Changing SDL Variables

PostPosted: Mon Jun 16, 2008 10:55 am
by D'Lanor
There is a sample script here: http://www.guildofwriters.com/wiki/Using_SDL_States.

It will be an interesting experiment to use one SDL variable for multiple objects. You'll have to write the alcscript manually though because the boolshowhide quickscript automatically uses the name of the object with the Vis postfix as SDL variable.

Code: Select all
<object name>:
    logic:
        actions:
          - type: pythonfile
            pythonfile:
                file: xAgeSDLBoolShowHide
                parameters:
                  - type: string
                    value: <sdl variable name>
                  - type: bool
                    value: true


I see no reason why it shouldn't work but I wonder why Cyan uses more elaborate methods to set visibility on multiple objects.