2525# from functools import partial
2626
2727from .. import Settings
28- from ..utils import File
28+ # from ..utils import File
29+ from ..utils import Create
2930from ..utils import Layers
3031from ..utils import Selector
3132# from ..utils import Blendshapes
@@ -49,11 +50,12 @@ def UICreate(self, layoutMain):
4950 # cmds.popupMenu()
5051 # cmds.menuItem(label = "Right-Click test")
5152 # cmds.menuItem(dividerLabel = "label", divider = True)
53+ # cmds.menuItem(label = "Right-Click test")
54+
55+ cmds .columnLayout (parent = layoutMain , adjustableColumn = True , width = Settings .windowWidthScroll )
5256
5357 ### MENU
54- cmds .columnLayout ("layoutMenuBar" , parent = layoutMain , adjustableColumn = True , width = Settings .windowWidthScroll )
5558 cmds .menuBarLayout ()
56-
5759 cmds .menu (label = "Layers" , tearOff = True )
5860 cmds .menuItem (label = "Layer Create" , command = self .LayerCreate )
5961 cmds .menuItem (label = "Layer Create For Selected" , command = self .LayerCreateForSelected )
@@ -62,41 +64,45 @@ def UICreate(self, layoutMain):
6264 cmds .menuItem (label = "Layer Move" , command = self .LayerMove )
6365
6466 ### BUTTONS
65- countOffsets = 4
66- cmds .gridLayout (parent = layoutMain , numberOfColumns = countOffsets , cellWidth = Settings .windowWidthMargin / countOffsets , cellHeight = Settings .lineHeight )
67+ cmds .columnLayout (parent = layoutMain , adjustableColumn = True , width = Settings .windowWidthScroll )
6768 # cmds.button(label = "**Nucleus", command = partial(Physics.CreateNucleus, "testNucleus", None))
68- cmds .button (label = "Particle" , command = PhysicsParticle .CreateOnSelected )
69- cmds .button (label = "P Aim" , command = PhysicsParticle .CreateAimOnSelected )
70- cmds .button (label = "P Combo" , command = PhysicsParticle .CreateComboOnSelected )
69+ cmds .button (label = "Particle Point " , command = PhysicsParticle .CreateOnSelected )
70+ cmds .button (label = "Particle Aim" , command = PhysicsParticle .CreateAimOnSelected )
71+ cmds .button (label = "Particle Combo" , command = PhysicsParticle .CreateComboOnSelected )
7172 # cmds.button(label = "**P Chain", command = PhysicsParticle.CreateAimChainOnSelected)
7273 # cmds.button(label = "Hair", command = partial(PhysicsHair.CreateNHairOnSelected, None))
74+ cmds .separator ()
75+ cmds .button (label = "Print General Options" , command = self .PrintAllOptions )
76+ cmds .separator ()
77+ cmds .button (label = "Create Locator Projected To Mesh" , command = self .CreateLocatorProjectedToMesh )
7378
74- countOffsets = 2
75- cmds .gridLayout (parent = layoutMain , numberOfColumns = countOffsets , cellWidth = Settings .windowWidthMargin / countOffsets , cellHeight = Settings .lineHeight )
76- def GetCheckboxEulerFilter (* args ):
77- self .optionsPlugin .PrintAllOptions ()
78- cmds .button (label = "Print General Options" , command = GetCheckboxEulerFilter )
79-
80- ### TEST LEAYER METHODS
79+ ### LAYERS
8180 def LayerCreate (* args ):
8281 Layers .Create ("testLayer" )
83-
8482 def LayerCreateForSelected (* args ):
8583 selected = Selector .MultipleObjects ()
8684 if (selected == None ):
8785 return
8886 Layers .CreateForSelected (selected )
89-
9087 def LayerDelete (* args ):
9188 Layers .Delete ("testLayer" )
92-
9389 def LayerGetSelected (* args ):
9490 Layers .GetSelected ()
95-
9691 def LayerMove (* args ):
9792 selected = Layers .GetSelected ()
9893 if (selected == None or len (selected ) < 2 ):
9994 cmds .warning ("Need to select at least 2 layers" )
10095 return
10196 Layers .MoveChildrenToParent (selected [:- 1 ], selected [- 1 ]) # FIXME main problem is layers have no selection order, they just listed from top to bottom
10297
98+
99+ ### OTHER
100+ def PrintAllOptions (self , * args ):
101+ self .optionsPlugin .PrintAllOptions ()
102+
103+ def CreateLocatorProjectedToMesh (* args ):
104+
105+ selected = cmds .ls (selection = True )
106+
107+ Create .CreateLocatorProjectedToMesh (mesh = selected [0 ], createInsideOutsideLogic = True )
108+
0 commit comments