From 2cc383ba66d5b562e647449ece385c21493f6d60 Mon Sep 17 00:00:00 2001 From: Eugene Date: Wed, 16 Oct 2024 11:01:40 -0700 Subject: [PATCH] add nhair experimental button --- GETOOLS_SOURCE/experimental/PhysicsHair.py | 4 ++-- GETOOLS_SOURCE/modules/Experimental.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GETOOLS_SOURCE/experimental/PhysicsHair.py b/GETOOLS_SOURCE/experimental/PhysicsHair.py index 967345a..ec5d935 100644 --- a/GETOOLS_SOURCE/experimental/PhysicsHair.py +++ b/GETOOLS_SOURCE/experimental/PhysicsHair.py @@ -105,13 +105,13 @@ def CreateNHairOnCurve(curve, nucleus): # TODO def CreateNHairOnSelected(nucleus, *args): # TODO # Check selected objects - selectedList = Selector.MultipleObjects(2) + selectedList = Selector.MultipleObjects(minimalCount = 2) if (selectedList == None): return curve = None - result = CreateNHairOnCurve(curve, nucleus) + result = CreateNHairOnCurve(curve = curve, nucleus = nucleus) print(result) diff --git a/GETOOLS_SOURCE/modules/Experimental.py b/GETOOLS_SOURCE/modules/Experimental.py index a47cfe4..14c3f68 100644 --- a/GETOOLS_SOURCE/modules/Experimental.py +++ b/GETOOLS_SOURCE/modules/Experimental.py @@ -22,7 +22,7 @@ # Source code: https://github.com/GenEugene/GETools or https://app.gumroad.com/geneugene import maya.cmds as cmds -# from functools import partial +from functools import partial from .. import Settings from ..utils import File @@ -30,7 +30,7 @@ from ..utils import Selector # from ..utils import Blendshapes # from ..experimental import Physics -# from ..experimental import PhysicsHair +from ..experimental import PhysicsHair from ..experimental import PhysicsParticle @@ -69,7 +69,7 @@ def UICreate(self, layoutMain): cmds.button(label = "P Aim", command = PhysicsParticle.CreateAimOnSelected) cmds.button(label = "P Combo", command = PhysicsParticle.CreateComboOnSelected) # cmds.button(label = "**P Chain", command = PhysicsParticle.CreateAimChainOnSelected) - # cmds.button(label = "Hair", command = partial(PhysicsHair.CreateNHairOnSelected, None)) + cmds.button(label = "N Hair", command = partial(PhysicsHair.CreateNHairOnSelected, None)) countOffsets = 2 cmds.gridLayout(parent = layoutMain, numberOfColumns = countOffsets, cellWidth = Settings.windowWidthMargin / countOffsets, cellHeight = Settings.lineHeight)