mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Removed copy keys command.
This commit is contained in:
parent
88ac2de732
commit
44e85eb339
4 changed files with 39 additions and 71 deletions
|
@ -218,7 +218,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
||||||
{
|
{
|
||||||
"Edit.SelectAll",
|
"Edit.SelectAll",
|
||||||
"Select &All",
|
"Select &All",
|
||||||
"Select all parts in the project",
|
"Select all pieces in the project",
|
||||||
"Ctrl+A"
|
"Ctrl+A"
|
||||||
},
|
},
|
||||||
// LC_EDIT_SELECT_NONE
|
// LC_EDIT_SELECT_NONE
|
||||||
|
@ -575,7 +575,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
||||||
{
|
{
|
||||||
"Edit.Tool.Insert",
|
"Edit.Tool.Insert",
|
||||||
"Insert",
|
"Insert",
|
||||||
"Add new parts to the model",
|
"Add new pieces to the model",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_EDIT_ACTION_LIGHT
|
// LC_EDIT_ACTION_LIGHT
|
||||||
|
@ -617,7 +617,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
||||||
{
|
{
|
||||||
"Edit.Tool.Rotate",
|
"Edit.Tool.Rotate",
|
||||||
"Rotate",
|
"Rotate",
|
||||||
"Rotate selected parts",
|
"Rotate selected pieces",
|
||||||
"Shift+R"
|
"Shift+R"
|
||||||
},
|
},
|
||||||
// LC_EDIT_ACTION_DELETE
|
// LC_EDIT_ACTION_DELETE
|
||||||
|
@ -631,7 +631,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
||||||
{
|
{
|
||||||
"Edit.Tool.Paint",
|
"Edit.Tool.Paint",
|
||||||
"Paint",
|
"Paint",
|
||||||
"Change part color",
|
"Change piece color",
|
||||||
"Shift+N"
|
"Shift+N"
|
||||||
},
|
},
|
||||||
// LC_EDIT_ACTION_ZOOM
|
// LC_EDIT_ACTION_ZOOM
|
||||||
|
@ -701,7 +701,7 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
||||||
{
|
{
|
||||||
"View.ZoomExtents",
|
"View.ZoomExtents",
|
||||||
"Zoom E&xtents",
|
"Zoom E&xtents",
|
||||||
"Fit all parts in current the view (hold the CTRL key down to zoom all views)",
|
"Fit all pieces in current the view (hold the CTRL key down to zoom all views)",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_VIEW_VIEWPOINT_FRONT
|
// LC_VIEW_VIEWPOINT_FRONT
|
||||||
|
@ -986,191 +986,184 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
|
||||||
},
|
},
|
||||||
// LC_PIECE_INSERT
|
// LC_PIECE_INSERT
|
||||||
{
|
{
|
||||||
"Part.Insert",
|
"Piece.Insert",
|
||||||
"&Insert",
|
"&Insert",
|
||||||
"Add a new part to the model",
|
"Add a new piece to the model",
|
||||||
"Insert"
|
"Insert"
|
||||||
},
|
},
|
||||||
// LC_PIECE_DELETE
|
// LC_PIECE_DELETE
|
||||||
{
|
{
|
||||||
"Part.Delete",
|
"Piece.Delete",
|
||||||
"&Delete",
|
"&Delete",
|
||||||
"Delete selected objects",
|
"Delete selected objects",
|
||||||
"Delete"
|
"Delete"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MOVE_PLUSX
|
// LC_PIECE_MOVE_PLUSX
|
||||||
{
|
{
|
||||||
"Part.Move.PlusX",
|
"Piece.Move.PlusX",
|
||||||
"Move +X",
|
"Move +X",
|
||||||
"Move selected objects along the X axis",
|
"Move selected objects along the X axis",
|
||||||
"Down"
|
"Down"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MOVE_MINUSX
|
// LC_PIECE_MOVE_MINUSX
|
||||||
{
|
{
|
||||||
"Part.Move.MinusX",
|
"Piece.Move.MinusX",
|
||||||
"Move -X",
|
"Move -X",
|
||||||
"Move selected objects along the X axis",
|
"Move selected objects along the X axis",
|
||||||
"Up"
|
"Up"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MOVE_PLUSY
|
// LC_PIECE_MOVE_PLUSY
|
||||||
{
|
{
|
||||||
"Part.Move.PlusY",
|
"Piece.Move.PlusY",
|
||||||
"Move +Y",
|
"Move +Y",
|
||||||
"Move selected objects along the Y axis",
|
"Move selected objects along the Y axis",
|
||||||
"Right"
|
"Right"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MOVE_MINUSY
|
// LC_PIECE_MOVE_MINUSY
|
||||||
{
|
{
|
||||||
"Part.Move.MinusY",
|
"Piece.Move.MinusY",
|
||||||
"Move -Y",
|
"Move -Y",
|
||||||
"Move selected objects along the Y axis",
|
"Move selected objects along the Y axis",
|
||||||
"Left"
|
"Left"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MOVE_PLUSZ
|
// LC_PIECE_MOVE_PLUSZ
|
||||||
{
|
{
|
||||||
"Part.Move.PlusZ",
|
"Piece.Move.PlusZ",
|
||||||
"Move +Z",
|
"Move +Z",
|
||||||
"Move selected objects along the Z axis",
|
"Move selected objects along the Z axis",
|
||||||
"PgUp"
|
"PgUp"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MOVE_MINUSZ
|
// LC_PIECE_MOVE_MINUSZ
|
||||||
{
|
{
|
||||||
"Part.Move.MinusZ",
|
"Piece.Move.MinusZ",
|
||||||
"Move -Z",
|
"Move -Z",
|
||||||
"Move selected objects along the Z axis",
|
"Move selected objects along the Z axis",
|
||||||
"PgDown"
|
"PgDown"
|
||||||
},
|
},
|
||||||
// LC_PIECE_ROTATE_PLUSX
|
// LC_PIECE_ROTATE_PLUSX
|
||||||
{
|
{
|
||||||
"Part.Rotate.PlusX",
|
"Piece.Rotate.PlusX",
|
||||||
"Rotate +X",
|
"Rotate +X",
|
||||||
"Rotate selected objects along the X axis",
|
"Rotate selected objects along the X axis",
|
||||||
"Shift+Down"
|
"Shift+Down"
|
||||||
},
|
},
|
||||||
// LC_PIECE_ROTATE_MINUSX
|
// LC_PIECE_ROTATE_MINUSX
|
||||||
{
|
{
|
||||||
"Part.Rotate.MinusX",
|
"Piece.Rotate.MinusX",
|
||||||
"Rotate -X",
|
"Rotate -X",
|
||||||
"Rotate selected objects along the X axis",
|
"Rotate selected objects along the X axis",
|
||||||
"Shift+Up"
|
"Shift+Up"
|
||||||
},
|
},
|
||||||
// LC_PIECE_ROTATE_PLUSY
|
// LC_PIECE_ROTATE_PLUSY
|
||||||
{
|
{
|
||||||
"Part.Rotate.PlusY",
|
"Piece.Rotate.PlusY",
|
||||||
"Rotate +Y",
|
"Rotate +Y",
|
||||||
"Rotate selected objects along the Y axis",
|
"Rotate selected objects along the Y axis",
|
||||||
"Shift+Right"
|
"Shift+Right"
|
||||||
},
|
},
|
||||||
// LC_PIECE_ROTATE_MINUSY
|
// LC_PIECE_ROTATE_MINUSY
|
||||||
{
|
{
|
||||||
"Part.Rotate.MinusY",
|
"Piece.Rotate.MinusY",
|
||||||
"Rotate -Y",
|
"Rotate -Y",
|
||||||
"Rotate selected objects along the Y axis",
|
"Rotate selected objects along the Y axis",
|
||||||
"Shift+Left"
|
"Shift+Left"
|
||||||
},
|
},
|
||||||
// LC_PIECE_ROTATE_PLUSZ
|
// LC_PIECE_ROTATE_PLUSZ
|
||||||
{
|
{
|
||||||
"Part.Rotate.PlusZ",
|
"Piece.Rotate.PlusZ",
|
||||||
"Rotate +Z",
|
"Rotate +Z",
|
||||||
"Rotate selected objects along the Z axis",
|
"Rotate selected objects along the Z axis",
|
||||||
"Shift+PgUp"
|
"Shift+PgUp"
|
||||||
},
|
},
|
||||||
// LC_PIECE_ROTATE_MINUSZ
|
// LC_PIECE_ROTATE_MINUSZ
|
||||||
{
|
{
|
||||||
"Part.Rotate.MinusZ",
|
"Piece.Rotate.MinusZ",
|
||||||
"Rotate -Z",
|
"Rotate -Z",
|
||||||
"Rotate selected objects along the Z axis",
|
"Rotate selected objects along the Z axis",
|
||||||
"Shift+PgDown"
|
"Shift+PgDown"
|
||||||
},
|
},
|
||||||
// LC_PIECE_MINIFIG_WIZARD
|
// LC_PIECE_MINIFIG_WIZARD
|
||||||
{
|
{
|
||||||
"Part.MinifigWizard",
|
"Piece.MinifigWizard",
|
||||||
"Minifig &Wizard...",
|
"Minifig &Wizard...",
|
||||||
"Add a new minifig to the model",
|
"Add a new minifig to the model",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_ARRAY
|
// LC_PIECE_ARRAY
|
||||||
{
|
{
|
||||||
"Part.Array",
|
"Piece.Array",
|
||||||
"A&rray...",
|
"A&rray...",
|
||||||
"Make copies of the selected parts",
|
"Make copies of the selected pieces",
|
||||||
""
|
|
||||||
},
|
|
||||||
// LC_PIECE_COPY_KEYS
|
|
||||||
{
|
|
||||||
"Part.CopyKeys",
|
|
||||||
"Copy Keys",
|
|
||||||
"Copy keys between animation and instruction modes",
|
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_GROUP
|
// LC_PIECE_GROUP
|
||||||
{
|
{
|
||||||
"Part.Group",
|
"Piece.Group",
|
||||||
"&Group...",
|
"&Group...",
|
||||||
"Group selected parts together",
|
"Group selected pieces together",
|
||||||
"Ctrl+G"
|
"Ctrl+G"
|
||||||
},
|
},
|
||||||
// LC_PIECE_UNGROUP
|
// LC_PIECE_UNGROUP
|
||||||
{
|
{
|
||||||
"Part.Ungroup",
|
"Piece.Ungroup",
|
||||||
"&Ungroup",
|
"&Ungroup",
|
||||||
"Ungroup selected group",
|
"Ungroup selected group",
|
||||||
"Ctrl+U"
|
"Ctrl+U"
|
||||||
},
|
},
|
||||||
// LC_PIECE_GROUP_ADD
|
// LC_PIECE_GROUP_ADD
|
||||||
{
|
{
|
||||||
"Part.GroupAdd",
|
"Piece.GroupAdd",
|
||||||
"&Add to Group",
|
"&Add to Group",
|
||||||
"Add focused part to selected group",
|
"Add focused piece to selected group",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_GROUP_REMOVE
|
// LC_PIECE_GROUP_REMOVE
|
||||||
{
|
{
|
||||||
"Part.GroupRemove",
|
"Piece.GroupRemove",
|
||||||
"Re&move from Group",
|
"Re&move from Group",
|
||||||
"Remove focused part from group",
|
"Remove focused piece from group",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_GROUP_EDIT
|
// LC_PIECE_GROUP_EDIT
|
||||||
{
|
{
|
||||||
"Part.GroupEdit",
|
"Piece.GroupEdit",
|
||||||
"&Edit Groups...",
|
"&Edit Groups...",
|
||||||
"Edit groups",
|
"Edit groups",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_HIDE_SELECTED
|
// LC_PIECE_HIDE_SELECTED
|
||||||
{
|
{
|
||||||
"Part.HideSelected",
|
"Piece.HideSelected",
|
||||||
"&Hide Selected",
|
"&Hide Selected",
|
||||||
"Hide selected objects",
|
"Hide selected objects",
|
||||||
"Ctrl+H"
|
"Ctrl+H"
|
||||||
},
|
},
|
||||||
// LC_PIECE_HIDE_UNSELECTED
|
// LC_PIECE_HIDE_UNSELECTED
|
||||||
{
|
{
|
||||||
"Part.HideUnselected",
|
"Piece.HideUnselected",
|
||||||
"Hide &Unselected",
|
"Hide &Unselected",
|
||||||
"Hide objects that are not selected",
|
"Hide objects that are not selected",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_UNHIDE_ALL
|
// LC_PIECE_UNHIDE_ALL
|
||||||
{
|
{
|
||||||
"Part.UnhideAll",
|
"Piece.UnhideAll",
|
||||||
"U&nhide All",
|
"U&nhide All",
|
||||||
"Show all hidden objects",
|
"Show all hidden objects",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_SHOW_EARLIER
|
// LC_PIECE_SHOW_EARLIER
|
||||||
{
|
{
|
||||||
"Part.ShowEarlier",
|
"Piece.ShowEarlier",
|
||||||
"Show Earlier",
|
"Show Earlier",
|
||||||
"Show selected parts one step earlier",
|
"Show selected pieces one step earlier",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_PIECE_SHOW_LATER
|
// LC_PIECE_SHOW_LATER
|
||||||
{
|
{
|
||||||
"Part.ShowLater",
|
"Piece.ShowLater",
|
||||||
"Show Later",
|
"Show Later",
|
||||||
"Show selected parts one step later",
|
"Show selected pieces one step later",
|
||||||
""
|
""
|
||||||
},
|
},
|
||||||
// LC_HELP_HOMEPAGE
|
// LC_HELP_HOMEPAGE
|
||||||
|
|
|
@ -165,7 +165,6 @@ enum LC_COMMANDS
|
||||||
LC_PIECE_ROTATE_MINUSZ,
|
LC_PIECE_ROTATE_MINUSZ,
|
||||||
LC_PIECE_MINIFIG_WIZARD,
|
LC_PIECE_MINIFIG_WIZARD,
|
||||||
LC_PIECE_ARRAY,
|
LC_PIECE_ARRAY,
|
||||||
LC_PIECE_COPY_KEYS,
|
|
||||||
LC_PIECE_GROUP,
|
LC_PIECE_GROUP,
|
||||||
LC_PIECE_UNGROUP,
|
LC_PIECE_UNGROUP,
|
||||||
LC_PIECE_GROUP_ADD,
|
LC_PIECE_GROUP_ADD,
|
||||||
|
|
|
@ -5895,26 +5895,6 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||||
CheckPoint("Array");
|
CheckPoint("Array");
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case LC_PIECE_COPY_KEYS:
|
|
||||||
{
|
|
||||||
float move[3], rot[4];
|
|
||||||
Piece* pPiece;
|
|
||||||
|
|
||||||
for (pPiece = m_pPieces; pPiece; pPiece = pPiece->m_pNext)
|
|
||||||
if (pPiece->IsSelected())
|
|
||||||
{
|
|
||||||
pPiece->CalculateSingleKey (m_bAnimation ? m_nCurStep : m_nCurFrame, !m_bAnimation, LC_PK_POSITION, move);
|
|
||||||
pPiece->CalculateSingleKey (m_bAnimation ? m_nCurStep : m_nCurFrame, !m_bAnimation, LC_PK_ROTATION, rot);
|
|
||||||
pPiece->ChangeKey(m_bAnimation ? m_nCurFrame : m_nCurStep, m_bAnimation, m_bAddKeys, move, LC_PK_POSITION);
|
|
||||||
pPiece->ChangeKey(m_bAnimation ? m_nCurFrame : m_nCurStep, m_bAnimation, m_bAddKeys, rot, LC_PK_ROTATION);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: cameras and lights
|
|
||||||
|
|
||||||
CalculateStep();
|
|
||||||
UpdateAllViews();
|
|
||||||
} break;
|
|
||||||
|
|
||||||
case LC_PIECE_GROUP:
|
case LC_PIECE_GROUP:
|
||||||
{
|
{
|
||||||
Group* pGroup;
|
Group* pGroup;
|
||||||
|
|
|
@ -331,12 +331,11 @@ void lcQMainWindow::createMenus()
|
||||||
menuToolBars->addAction(timeToolBar->toggleViewAction());
|
menuToolBars->addAction(timeToolBar->toggleViewAction());
|
||||||
menuView->addAction(actions[LC_VIEW_FULLSCREEN]);
|
menuView->addAction(actions[LC_VIEW_FULLSCREEN]);
|
||||||
|
|
||||||
menuPiece = menuBar()->addMenu(tr("&Part"));
|
menuPiece = menuBar()->addMenu(tr("&Piece"));
|
||||||
menuPiece->addAction(actions[LC_PIECE_INSERT]);
|
menuPiece->addAction(actions[LC_PIECE_INSERT]);
|
||||||
menuPiece->addAction(actions[LC_PIECE_DELETE]);
|
menuPiece->addAction(actions[LC_PIECE_DELETE]);
|
||||||
menuPiece->addAction(actions[LC_PIECE_ARRAY]);
|
menuPiece->addAction(actions[LC_PIECE_ARRAY]);
|
||||||
menuPiece->addAction(actions[LC_PIECE_MINIFIG_WIZARD]);
|
menuPiece->addAction(actions[LC_PIECE_MINIFIG_WIZARD]);
|
||||||
// LC_PIECE_COPY_KEYS
|
|
||||||
menuPiece->addSeparator();
|
menuPiece->addSeparator();
|
||||||
menuPiece->addAction(actions[LC_PIECE_GROUP]);
|
menuPiece->addAction(actions[LC_PIECE_GROUP]);
|
||||||
menuPiece->addAction(actions[LC_PIECE_UNGROUP]);
|
menuPiece->addAction(actions[LC_PIECE_UNGROUP]);
|
||||||
|
@ -1058,7 +1057,6 @@ void lcQMainWindow::updateSelectedObjects(int flags, int selectedCount, Object*
|
||||||
actions[LC_EDIT_SELECT_ALL]->setEnabled(flags & LC_SEL_UNSELECTED);
|
actions[LC_EDIT_SELECT_ALL]->setEnabled(flags & LC_SEL_UNSELECTED);
|
||||||
|
|
||||||
actions[LC_PIECE_DELETE]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
actions[LC_PIECE_DELETE]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
||||||
actions[LC_PIECE_COPY_KEYS]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
|
||||||
actions[LC_PIECE_ARRAY]->setEnabled(flags & LC_SEL_PIECE);
|
actions[LC_PIECE_ARRAY]->setEnabled(flags & LC_SEL_PIECE);
|
||||||
actions[LC_PIECE_HIDE_SELECTED]->setEnabled(flags & LC_SEL_PIECE);
|
actions[LC_PIECE_HIDE_SELECTED]->setEnabled(flags & LC_SEL_PIECE);
|
||||||
actions[LC_PIECE_UNHIDE_ALL]->setEnabled(flags & LC_SEL_HIDDEN);
|
actions[LC_PIECE_UNHIDE_ALL]->setEnabled(flags & LC_SEL_HIDDEN);
|
||||||
|
@ -1128,8 +1126,6 @@ void lcQMainWindow::updateAnimation(bool animation, bool addKeys)
|
||||||
gtk_widget_set_sensitive (anim_toolbar.stop, FALSE);
|
gtk_widget_set_sensitive (anim_toolbar.stop, FALSE);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.anim), bAnimation);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.anim), bAnimation);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.keys), bAddKeys);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(anim_toolbar.keys), bAddKeys);
|
||||||
gpointer item = gtk_object_get_data (GTK_OBJECT (((GtkWidget*)(*main_window))), "menu_piece_copykeys");
|
|
||||||
gtk_label_set_text (GTK_LABEL (GTK_BIN (item)->child), bAnimation ? "Copy Keys from Instructions" : "Copy Keys from Animation");
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue