Name
Pass

4. Tablet sheet files

3. Minfig generator file | | 5. Core files

Using a tablet can be fun and handy, but before you can use it you'll need a sheet indicating the button and sliders you can control with your tablet pen. By default there are two A5 sheets available with a generic set of buttons and sliders. These are very usable but for complicated projects you might want to create a specific sheet, utilizing a layout specifically designed for the most important animation elements in your project.

After reading this chapter, you should be able to create such a sheet, The file's generic structure is as follows:

<LD4DStudioTabletSheete>
 <Info>
  <Description> ... </Description>
 </Info>

 <Groups>
  <Group />
  <Group />
  <Group />
 </Groups>

 <Objects>
  <Comment />
  <Rectangle />
  <Button />
  <PlaybackBar />
  <SpeedCtrl />
  <SlomoCtrl />
  <AnaElmCtrl />
  <BinElmCtrl />
 </Objects>
</LD4DStudioMaterialFile>

The info block

The first major block of elements is the "Info" block, it is used to set the base properties of the sheet and to supply information to the user about this sheet.

Valid attributes for the "Info" element are:

authorThe name of the person who created this sheet.
widthThis will set the internal width of the sheet, it's up to you to decide what kind of units you wish to use. The kind of unit is irrelevant because the sheet will be scaled to fit the target paper later on. But for the internal placement of the buttons etc you'll need some kind of virtual measurement system. In practice it's best to decide the target paper size (e.g. A4 or A5) and take it's width in millimeters for the value of the width attribute.
heightSame as width but for height.
marginHow much spacing must be used from all sides. So if you used 200 for width and 10 for margin you'll have 180 units of space to position your buttons and sliders in.

The "Description" element can optionally be added to add an extended description of the intended use of this sheet.

The groups block

Second block in the structure is the "Groups" block. It encapsulates a number of "Group" elements used to define control groups on the sheet. A control group is a collection of one or more analog or binary sliders. These groups can then be assigned to a control panel group in LD4Dstudio much like with the joysticks. Difference being there can be more then one to assign. After a group is assigned to a control panel group the sliders in this group on the sheet will be mapped to the controls on the screen and ready to be manipulated using you tablet pen.

The "Group" element has only two attributes, namely: "index" and "name". Index is used to link sliders to this group further down in the file. Name off course is used to identify the group human friendly. It will be displayed in LD4DStudio where needed.

The objects block

Last and biggest part of the file is the "Objects" block, it is used to encapsulate an unlimited number of control objects like buttons and sliders to be placed on the sheet. There are a number of different kinds of objects, identified by their element name. Lets go over them one by one.

The comment object

The "Comment" element is used to specify some internal comment on the next few objects in the list. It's purely for the designer of the sheet. At the moment it isn't even read by the loader, but it might be in future versions so it's encouraged to use them like described here. The element has only one attribute, namely: "text". It off course holds the actual comment.

The rectangle object

The "Rectangle" element is used to draw a simple non interactive rectangle on the sheet for layout purposes. It's attributes are:

posThis defines the upper left corner location of the rectangle in the coordinate system as defined by width and height of the info element. Meaning a value of "0, 0" will place it on the very top left taking the margin in account. The value consists of an X and Y value.
sizeThis defines the relative width and height of the rectangle, e.g. "100, 50" for a rectangle of 100 units wide and 50 units high.

The button object

The "button" element is used for a simple rectangular area that can be tabbed by your tablet pen resulting in taking some action in the assigned target (e.g. the animation player). It basic properties ("pos" and "size") are the same as in the rectangle object. But the additional attribute "type" determines what action is linked to this virtual button. Possible values for the "type" attribute are:

aniPlay_Stopstops the linked animation playback.
aniPlay_PausePauses the linked animation playback.
aniPlay_PlayStart playing the linked animation playback.
aniPlay_RevReverse the linked animation playback.
aniPlay_FastPlayFast forward play the linked animation playback.
aniPlay_FastRevFast reversed play the linked animation playback.
aniPlay_SlowPlaySlow motion play the linked animation playback.
aniPlay_SlowRevSlow motion reverse play the linked animation playback.
aniPlay_FirstGo to the first frame of the linked animation.
aniPlay_LastGo to the last frame of the linked animation.
aniPlay_NextFrameGo to the next frame of the linked animation.
aniPlay_PrevFrameGo to the previous frame of the linked animation.
aniPlay_IntStartSet the interval start to the current frame of the linked animation.
aniPlay_IntEndSet the interval end to the current frame of the linked animation.
aniPlay_IntClearClear the interval for the linked animation.
aniPlay_IntEnabeldToggle the enabled state of the interval for the linked animation.
aniPlay_LoopToggle the loop state of the linked animation.
aniPlay_SimToggle the simulate state of the linked animation.

Every type has it's own graphical representation on the sheet so don't worry about how to keep them apart when putting multiple buttons in a grid. Just don't make them to small and it's common practice to make them nearly square.

The playback bar object

The "playbackBar" element is used to define a rectangular region in which you control the current playback position of a linked animation. It's much like the white/blue bar on the bottom of the animation player window. It's only attributes are the previously described "pos" and "size".

When placing a playback bar on your sheet you should keep in mind it should be quite wide, because the current frame will be calculated depending on the tablet pen's position within this rectangle. So if you make it very small a single centimeter on your sheet might represent minutes of your animation.

The speed control object

The "speedCtrl" element is used to define a rectangular region in which you control the current playback speed of a linked animation. It's much like an professional vcr's jog and shuffle dial. While holding your tablet pen down in this region moving it to the right will increase the playback speed and moving it to the right will decrease it.

This element only has the common "pos" and "size" attributes. And much like the playback bar rectangle you probably shouldn't make this rectangle to narrow.

The slow motion control object

The "slomoCtrl" element is much like the speedCtrl one, except it controls slow motion speed instead of fast forward and reverse.

This element also only has the common "pos" and "size" attributes.

The analog animation element slider object

The "AnaElmCtrl" element is used to define a rectangular region in which you control a linked analog animation element. Like all objects it has the familiar "pos" and "size" attributes for it placement and dimensions. In addition to them there are two more attributes, namely:

groupUse this attribute to make the control part of a group defined in the "Groups" block. Use the "Group"'s index value in this attribute to link them together.
indexThis attribute controls the order of the controls in the group. So if you add 10 controls to group "1" the corresponding elements "index" attributes should go from "0" to "9". If you don't set the index attribute all sheet controls will map to the first control in the linked control panel group!

The binary animation element slider object

The "BinElmCtrl" element is identical to the "AnElmCtrl" element except it defines a binary animation element region on your sheet. All other aspects including are the same. You can mix analog and binary sliders in the same group but keep in mind the corresponding control panel group should have the same analog / binary patron of control types.

Conclusion

Above should get you going in creating your own tablet sheets, but I highly recommend studing the two official ones in the tabletSheet directory of your LD4DStudio installation before getting to work yourself. They demonstrate most possibilities and should provide you with an nice basis for creating your own sheets.

3. Minfig generator file | | 5. Core files
Best viewed with Firefox 2, Seamonkey or IE 7 at 1024x768 or higher resolution.
 
LEGO is a registered trademark of the LEGO Group, which does not sponsor, endorse, or authorize this website.