Difference between revisions of "User:Rev Eponym/nPose"

From Second Life Wiki
Jump to navigation Jump to search
Line 16: Line 16:


==Built-in menu buttons==
==Built-in menu buttons==
ChangeSeat
;ChangeSeat
This button will bring up a submenu showing the available seats and who is seated where. Clicking an empty seat will move you to that seat location and pose you.  Clicking an occupied     seat will swap both seated Avatars.
:When a multiple-pose animation set is active, this button shows the other positions available. Clicking an empty position will place your avatar in that position; when that position is occupied, avatar positions will be swapped.


sync
;Sync
This button will synchronize or restart the animations in this pose set.
:Restarts the animations in a set, so that avatar animations will be in sync.


offset
;Offset
This button will bring up a sub menu to be used to adjust for your particular Avatar size. Once you have adjusted your position, these offsets will be applied to you whenever you sit or whatever seat you pick.  These offsets are remembered by the nPose engine until the scripts are reset.
:Activates the position adjustment menu for your avatar. These settings are saved in script memory for your avatar, until the scripts are reset or nPose is restarted.


->
; -> or <-
This button appears if a menu has too many entries to fit on one menu page (12 maximum).
:'Next page' or 'Previous page' button, active when a menu has more than 12 buttons.


^
; ^ (up caret)
This button appears on sub-menus, and returns the user to the menu from which the user came here.
:'Up' menu button, goes back to the previous menu from a submenu.




===Owner-only menu buttons===
===Admin menu - Owner only===
Built-in Menu Buttons and Options that only the owner sees:
The admin menu is only available to the owner of the nPose build. The ''''admin'''' button will bring up a submenu with the following buttons:
 
;Adjust
:Clicking this button will tell the nPose engine to rez adjuster prims used to adjust the position of the seat positions.
 
;StopAdjust
:Clicking this button will tell the nPose engine to de-rez the adjuster prims.
 
;PosDump
:Clicking this button will tell the nPose engine to chat all of the current pose set lines to local, typically used to edit and save new positions for seated Avatars and props.
 
;Unsit
:Clicking this button will bring up a submenu with the names of all seated Avatars.  Click the name of the Avatar you wish to unseat from the nPose build.
 
;Options
:This button activates the Options submenu, with the following commands:
 
 
===Options menu - Owner only===
;Permit
:Clicking this button will bring up a submenu for setting who is allowed to use the menu.  The current setting will be displayed at the top of the menu.  The following options are                available:
 
;Permit->Public
:Clicking this button will set permissions so that anyone is allowed to use the menus.
 
;Permit->Locked
:Clicking this button will set permissions so that only the owner is allowed to use the menus.
 
;Permit->Group
:Clicking this button will set permissions so that anyone with their active group matching the group set to the nPose build is allowed to use the menus.
 
;Menuonsit
:Clicking this button will bring up a submenu to turn on or turn off the option of having a menu pop up when an authorized sitter sits the nPose build.
 
;ToDefault
:Clicking this button will bring up a submenu to turn on or turn off the option of having nPose return to the DEFAULT pose when all seated Avatars have stood.




Line 77: Line 112:




'''DEFAULT''' - Used as the default pose set when nPose is initialized, and there can be only one with this type. Otherwise, it's the same as SET below. If no DEFAULT notecard is included in the contents of the nPose object, nPose will use the first SET notecard in the contents (alphabetically) as the DEFAULT.
;DEFAULT
:Used as the default pose set when nPose is initialized, and there can be only one with this type. Otherwise, it's the same as SET below. If no DEFAULT notecard is included in the contents of the nPose object, nPose will use the first SET notecard in the contents (alphabetically) as the DEFAULT.


'''SET''' - Used to define a group of animations which will appear in the nPose menu with the name after the colon in the notecard name. The notecard contains one line for each sitter, listing animation name and position. There can also be other lines, for functions that will be triggered along with the animation set. The -keywords- section defines the different function types available.
;SET
:Used to define a group of animations which will appear in the nPose menu with the name after the colon in the notecard name. The notecard contains one line for each sitter, listing animation name and position. There can also be other lines, for functions that will be triggered along with the animation set. The -keywords- section defines the different function types available.


'''BTN''' - Used for internal functions, or to send messages to other scripts within the linkset or to rezzed props.
;BTN
:Used for internal functions, or to send messages to other scripts within the linkset or to rezzed props.


'''SEQ''' - Used to setup sequences of pose sets.  It communicates to the modified Rygel sequencer script. Details are provided later.
;SEQ
:Used to setup sequences of pose sets.  It communicates to the modified Rygel sequencer script. Details are provided later.


==Notecard commands==
==Notecard commands==

Revision as of 16:36, 31 March 2013

nPose new documentation

KBwarning.png Warning: If you're reading this, it is unofficial. Testing and composition only!

nPose is a system for coordinating animations between several avatars seated on the same object (linkset), such as a couch or bed, as well as rezzable, coordinated props. Unlike previous systems, nPose does not use poseballs to accomplish this.

What's a 'posing system'?

Null


Built-in menu buttons

ChangeSeat
When a multiple-pose animation set is active, this button shows the other positions available. Clicking an empty position will place your avatar in that position; when that position is occupied, avatar positions will be swapped.
Sync
Restarts the animations in a set, so that avatar animations will be in sync.
Offset
Activates the position adjustment menu for your avatar. These settings are saved in script memory for your avatar, until the scripts are reset or nPose is restarted.
-> or <-
'Next page' or 'Previous page' button, active when a menu has more than 12 buttons.
^ (up caret)
'Up' menu button, goes back to the previous menu from a submenu.


Admin menu - Owner only

The admin menu is only available to the owner of the nPose build. The 'admin' button will bring up a submenu with the following buttons:

Adjust
Clicking this button will tell the nPose engine to rez adjuster prims used to adjust the position of the seat positions.
StopAdjust
Clicking this button will tell the nPose engine to de-rez the adjuster prims.
PosDump
Clicking this button will tell the nPose engine to chat all of the current pose set lines to local, typically used to edit and save new positions for seated Avatars and props.
Unsit
Clicking this button will bring up a submenu with the names of all seated Avatars. Click the name of the Avatar you wish to unseat from the nPose build.
Options
This button activates the Options submenu, with the following commands:


Options menu - Owner only

Permit
Clicking this button will bring up a submenu for setting who is allowed to use the menu. The current setting will be displayed at the top of the menu. The following options are available:
Permit->Public
Clicking this button will set permissions so that anyone is allowed to use the menus.
Permit->Locked
Clicking this button will set permissions so that only the owner is allowed to use the menus.
Permit->Group
Clicking this button will set permissions so that anyone with their active group matching the group set to the nPose build is allowed to use the menus.
Menuonsit
Clicking this button will bring up a submenu to turn on or turn off the option of having a menu pop up when an authorized sitter sits the nPose build.
ToDefault
Clicking this button will bring up a submenu to turn on or turn off the option of having nPose return to the DEFAULT pose when all seated Avatars have stood.


Notecard types

nPose uses different types of notecards to define its customized menu functions. Each of these notecards has its type spelled out in capitals at the beginning of its name, like so: style="text-size:75%;" style="background:#E8F1F8;"


Notecard Type Function ... Example name
DEFAULT Animations .. DEFAULT:Sitting
SET Animations .. SET:Lounging
BTN Script messaging .. BTN:Colors
SEQ Sequences of Sets .. SEQ:Line Dance
KBcaution.png Important: The type name must be in all caps, with no spaces, with a colon(':') before the rest of the name. Without this, the scripts won't be able to find the notecards, and the item will not appear in the menu.


DEFAULT
Used as the default pose set when nPose is initialized, and there can be only one with this type. Otherwise, it's the same as SET below. If no DEFAULT notecard is included in the contents of the nPose object, nPose will use the first SET notecard in the contents (alphabetically) as the DEFAULT.
SET
Used to define a group of animations which will appear in the nPose menu with the name after the colon in the notecard name. The notecard contains one line for each sitter, listing animation name and position. There can also be other lines, for functions that will be triggered along with the animation set. The -keywords- section defines the different function types available.
BTN
Used for internal functions, or to send messages to other scripts within the linkset or to rezzed props.
SEQ
Used to setup sequences of pose sets. It communicates to the modified Rygel sequencer script. Details are provided later.

Notecard commands

Each line of a notecard begins with a command in all caps, similar to notecard type names. Supported commands are as follows:


Command Function Data format
ANIM Animation name, position and rotation ANIM|animation-name|<vector (x,y,z) position>|<vector (x,y,z) rotation>
LINKMSG Message to other scripts LINKMSG|msg-number|user-string|some-key
SATMSG Activated when an avatar sits (need code sample)
NOSATMSG Activated when an avatar stands (unsits) (need code sample)
PROP Rezzes a prop in the position specified (need code sample)


User-defined menus

Group the notecard names.


not used yet

where msg-number is some number set by convention (see the LINKMSG messages notecard) and the remaining (optional) fields are defined by the message number.



The most common thing to put in BTN notecard is LINKMSG lines. These have the general format (again without leading spaces):

LINKMSG|msg-number|user-string|some-key


ANIM|meditation|<-0.3,0,0.8>|<0,0,0>

where ANIM says that this line describes an animation, and "mediation" is the name of the animation (which must be included in the nPose object), and the rest is a position offset and rotation. There is one ANIM line for each avatar who can sit on the nPose object. You can put <0,0,0> for both position and rotation, and use the nPose adjustment tool to find the proper values. We'll describe how later. You can also include LINKMSG and other types of lines in the SET notecards, and those will be described later also.


<lsl> default {

   state_entry()
   {
       llSay(0, "Hello, Avatar!");
   }

   touch_start(integer total_number)
   {
       llSay(0, "Touched.");
   }

} </lsl>