mirror of
https://github.com/panda3d/panda3d.git
synced 2026-04-22 14:41:36 -05:00
194 lines
7.5 KiB
Plaintext
194 lines
7.5 KiB
Plaintext
5/25/01
|
|
DIRECT
|
|
|
|
****************************************************************************
|
|
STARTING DIRECT
|
|
****************************************************************************
|
|
|
|
# IN YOUR CONFIGRC
|
|
want-directtools #t
|
|
want-tk #t
|
|
# Optional: GL allows lines of different widths
|
|
load-display pandagl
|
|
|
|
# IN PYTHON
|
|
from ShowBaseGlobal import *
|
|
|
|
****************************************************************************
|
|
OBJECT MANIPULATION
|
|
****************************************************************************
|
|
|
|
All object manipulation is performed with left mouse button (LMB).
|
|
Objects are selected by clicking on them with the LMB. Objects can be
|
|
manipulated freely, or manipulation can be constrained using DIRECT
|
|
widgets. Rotations and scales are relative to the object's Center of
|
|
Action (COA). If widget is made visible ('v' key), this is the point
|
|
of intersection of the three axes (red, green, blue lines).
|
|
|
|
FREE MANIPULATION:
|
|
For free manipulation, the window is divided up into three regions: an
|
|
outer frame, central region, and the four corners. Object manipulation
|
|
depends on where mouse interaction begins.
|
|
|
|
Central Region:
|
|
LMB:
|
|
Up/Down/Left/Right: Moves object in plane parallel to camera's image
|
|
plane
|
|
Shift + LMB:
|
|
Up/Down: Moves object's COA in camera's XY plane
|
|
Left/Right: Moves object parallel to camera's X axis
|
|
Control + LMB:
|
|
Up/Down: Moves object's COA toward Camera (in Y and Z)
|
|
Left/Right: Moves object parallel to camera's X axis
|
|
Alt + LMB (off of widget):
|
|
Away from COA: scale object up
|
|
Towards COA: scale object down
|
|
Outer Region:
|
|
LMB:
|
|
Up/Down/Left/Right: Rotates object about current COA (default is
|
|
model's origin, modified using manipulation widget...see below).
|
|
If mouse stays within outer frame, motion about COA is constrained
|
|
to a single axis. (parallel to camera's X axis when in left and
|
|
right part of the frame and parallel to the camera's Z axis when
|
|
in the top or bottom part of the frame)
|
|
Four corners:
|
|
LMB:
|
|
Up/Down/Left/Right: Roll object about current center of action.
|
|
|
|
CONSTRAINED/WIDGET MANIPULATION:
|
|
For constrained/widget manipulation, object motion depends on where the
|
|
mouse begins:
|
|
Axis lines: 1D translation along the chosen axis
|
|
Rotation rings: 1D rotation about orthogonal axis
|
|
Translation discs: 2D translation in the plane of the disc
|
|
|
|
Pressing 'Tab' toggles between object manipulation or COA manipulation
|
|
(indictated by widget lines turning grey). When in COA manipulation mode,
|
|
movement of the widget does not move the object but changes the object's
|
|
COA. Hit 'Tab' again to return to normal object manipulation mode.
|
|
|
|
****************************************************************************
|
|
CAMERA MANIPULATION
|
|
****************************************************************************
|
|
|
|
All camera manipulation performed with middle mouse button (MMB).
|
|
|
|
Camera manipulation depends on where mouse interaction begins and the
|
|
current center of action (COA).
|
|
|
|
The window is divided up into three regions: an outer frame, central region,
|
|
and the four corners. A different manipulation mode is defined for each
|
|
region and is described below.
|
|
|
|
The camera center of action (COA) determines the center of rotation of any
|
|
rotation moves and the scale factor for any translation moves.
|
|
|
|
The COA is set by quickly clicking (less than .25 second or 1 frame) with
|
|
the MMB in the central region. It is defined as the intersection point of
|
|
the ray from the camera's origin, through the mouse with the model. If no
|
|
intersection occurs, the COA is put out along the camera's Y axis. Each
|
|
time the MMB is clicked with no intersection the COA moves further out
|
|
along the Y axis.
|
|
|
|
Pressing 'L' toggles COA lock, when on, the COA is locked in its current
|
|
location.
|
|
|
|
Central Region:
|
|
MMB:
|
|
Up/Down: Moves camera towards mouse intersection point
|
|
Left/Right: Yaws camera
|
|
Control + MMB:
|
|
Up/Down: Moves camera along view vector (perpendicular to image plane)
|
|
Left/Right: Yaws camera
|
|
Shift + MMB:
|
|
Up/Down/Left/Right: shifts camera in image plane
|
|
Outer Region:
|
|
MMB:
|
|
Up/Down/Left/Right: Rotates about current COA. If mouse stays within
|
|
outer frame, motion about COA is constrained to a single axis.
|
|
(parallel to camera's X axis when in left and right part of the frame
|
|
and parallel to the camera's Z axis when in the top or bottom part of
|
|
the frame)
|
|
Shift + MMB:
|
|
Up/Down: Pitch about camera's X axis
|
|
Left/Right: Yaw about camera's Z axis
|
|
Four corners:
|
|
MMB:
|
|
Up/Down/Left/Right: Roll about current center of action.
|
|
|
|
The number keys and plus minus keys can be used for motion relative to the
|
|
COA (see hot keys below)
|
|
|
|
****************************************************************************
|
|
HOTKEYS
|
|
****************************************************************************
|
|
|
|
# UNDO/REDO
|
|
[ undo
|
|
] redo
|
|
|
|
# CAMERA MOVES
|
|
+ zoomCam in
|
|
- zoomCam out
|
|
1 front view (render relative)
|
|
2 back view (render relative)
|
|
3 right view (render relative)
|
|
4 left view (render relative)
|
|
5 top view (render relative)
|
|
6 bottom view (render relative)
|
|
7 3/4 view (render relative)
|
|
8 roll view about axis relative to camera's axis
|
|
9 swing camera about hot point (about render's Z axis)
|
|
0 swing camera about hot point (about render's Z axis)
|
|
c center on hot point
|
|
f fit on hot point
|
|
h move camera to home (0,0,0)
|
|
L toggle hot point lock (if set, hot point stays in current location)
|
|
n select next possible camera COA (along last intersection ray)
|
|
u orbit upright cam about hot point
|
|
U upright cam
|
|
` kill camera move task
|
|
|
|
# RENDER STYLE
|
|
A show all
|
|
control-f flash selected
|
|
b toggle backface
|
|
l toggle lights
|
|
t toggle texture
|
|
w toggle wireframe
|
|
|
|
# DIRECT CONTROLS
|
|
delete delete selected object
|
|
escape deselect all
|
|
page_down move down selected objects hierarchy
|
|
page_up move up selected objects hierarchy
|
|
tab toggle widget mode (move objects or set center of action)
|
|
F grow widget to fit current view
|
|
i plant selected object at cursor intersection point
|
|
m move widget in front of camera
|
|
p set active parent to selected object
|
|
r wrt reparent selected to active parent
|
|
R reparent selected to active parent
|
|
s (re)select last selected object
|
|
v toggle widget visibility
|
|
V toggle COA marker visibility
|
|
< shrink widget
|
|
> expand widget
|
|
|
|
# LEVEL EDITOR
|
|
insert add new object of current object type
|
|
space add exact copy of current object
|
|
right move selected object right (in screen space)
|
|
left move selected object left (in screen space)
|
|
down move selected object down (in screen space)
|
|
up move selected object up (in screen space)
|
|
a auto position snap point to selected object
|
|
j move selected object to snap point
|
|
shift-s place suit point
|
|
shift-c place battle cell
|
|
|
|
# ROBOT TOON MANAGER
|
|
f9 take screenshot
|
|
f10 place new random robot toon
|
|
f11 toggle visibility of render2d
|