Omita
03-29-2008, 04:55 AM
I am having a hell of a time trying to get a modelEditor to accept the common navigation keys. I have included some test code. I also can not figure out how to get a modelPanel in a formLayout to work. :)
Thanks in advance.
-H
//modelPanel Example
proc NewPanelWindow()
{
if(`window -exists myPanelWindow`)
deleteUI -window myPanelWindow;
if (`modelPanel -exists myPanelPanel`)
deleteUI -panel myPanelPanel;
window
-title "Panel Window"
-w 550
-h 275
myPanelWindow
;
columnLayout -columnAttach "both" 2 -columnWidth 550;
frameLayout -lv 0 -w 550 -h 180;
modelPanel -mbv 0 -cam "persp" myPanelPanel;
setParent ..;
setParent ..;
rowLayout
-numberOfColumns 2
-columnWidth2 225 225
-columnAlign 1 "center"
-columnAttach 1 "both" 2
-columnAlign 2 "center"
-columnAttach 2 "both" 2
;
button -w 50 -l "Left Button" LeftButton;
button -w 75 -l "Right Button" RightButton;
setParent ..;
showWindow myPanelWindow;
}
//modelEditor Example
proc NewFormWindow()
{
// window;
if (`window -exists myFormWindow`)
deleteUI myFormWindow;
if (`modelEditor -exists myModelEditor`)
deleteUI myModelEditor;
window
-title "Form Window"
-w 550
-h 275
myFormWindow
;
//form layout
formLayout myFormForm;
//----- content
modelEditor -cam "persp" -allObjects 0 -grid 0 -nurbsSurfaces 1 -dimensions 1 myModelEditor;
button -l "Left Button" LeftButton;
button -l "Right Button" RightButton;
//----- end content
//modelEditor -e -interactive myModelEditor;
formLayout -edit
-attachForm myModelEditor top 0
-attachForm myModelEditor left 0
-attachForm myModelEditor right 0
-attachForm myModelEditor bottom 25
-attachControl LeftButton top 2 myModelEditor
-attachForm LeftButton left 0
-attachPosition LeftButton right 2 50
-attachForm LeftButton bottom 2
-attachControl RightButton top 2 myModelEditor
-attachControl RightButton left 2 LeftButton
-attachForm RightButton right 0
-attachForm RightButton bottom 2
//Form
myFormForm
;
showWindow myFormWindow;
}
Thanks in advance.
-H
//modelPanel Example
proc NewPanelWindow()
{
if(`window -exists myPanelWindow`)
deleteUI -window myPanelWindow;
if (`modelPanel -exists myPanelPanel`)
deleteUI -panel myPanelPanel;
window
-title "Panel Window"
-w 550
-h 275
myPanelWindow
;
columnLayout -columnAttach "both" 2 -columnWidth 550;
frameLayout -lv 0 -w 550 -h 180;
modelPanel -mbv 0 -cam "persp" myPanelPanel;
setParent ..;
setParent ..;
rowLayout
-numberOfColumns 2
-columnWidth2 225 225
-columnAlign 1 "center"
-columnAttach 1 "both" 2
-columnAlign 2 "center"
-columnAttach 2 "both" 2
;
button -w 50 -l "Left Button" LeftButton;
button -w 75 -l "Right Button" RightButton;
setParent ..;
showWindow myPanelWindow;
}
//modelEditor Example
proc NewFormWindow()
{
// window;
if (`window -exists myFormWindow`)
deleteUI myFormWindow;
if (`modelEditor -exists myModelEditor`)
deleteUI myModelEditor;
window
-title "Form Window"
-w 550
-h 275
myFormWindow
;
//form layout
formLayout myFormForm;
//----- content
modelEditor -cam "persp" -allObjects 0 -grid 0 -nurbsSurfaces 1 -dimensions 1 myModelEditor;
button -l "Left Button" LeftButton;
button -l "Right Button" RightButton;
//----- end content
//modelEditor -e -interactive myModelEditor;
formLayout -edit
-attachForm myModelEditor top 0
-attachForm myModelEditor left 0
-attachForm myModelEditor right 0
-attachForm myModelEditor bottom 25
-attachControl LeftButton top 2 myModelEditor
-attachForm LeftButton left 0
-attachPosition LeftButton right 2 50
-attachForm LeftButton bottom 2
-attachControl RightButton top 2 myModelEditor
-attachControl RightButton left 2 LeftButton
-attachForm RightButton right 0
-attachForm RightButton bottom 2
//Form
myFormForm
;
showWindow myFormWindow;
}
