Ускоряя Maya, послесловие. Скрипты для ускорения работы в Maya.
- Автор темы Дмитрий damat Астапкович
- Дата создания
- Рейтинг
- 4
Подскажите пожалуйста как сделать следующее ;
1)Хот-кей на двойное нажатие (как в ае), на первое нажатие инструмент, на второе его опции?
2)Как повесить на один и тот же шорт кат разные команды,например на Ctrl+Shift+A выделить всё и следующее нажатие выполняло команду Deselect?
1)Хот-кей на двойное нажатие (как в ае), на первое нажатие инструмент, на второе его опции?
2)Как повесить на один и тот же шорт кат разные команды,например на Ctrl+Shift+A выделить всё и следующее нажатие выполняло команду Deselect?
Просто так взять и повесить две разные команды (вроде бы) нельзя. Нет, в принципе, можно, но чтобы при этом выполнялся осмысленный и желаемый набор действий - проблема.
По поводу select all/deselect all на одной клавише - следующий кусок кода умеет делать это на основе заранее указанных типов (в случае чего туда можно смело дописывать нужные типы и, наверное, это будет работать... проверялось всё на mesh+nurbsCurve):
Код:
import maya.cmds as cmds
import maya.OpenMaya as om
#specify types of objects on which objects will be filtered
types = ["mesh", "nurbsCurve"]
#filtered list of all objects(shapes) that should be selected
all_objects_shapes = cmds.ls(visible=True, type=types)
if all_objects_shapes:
#convert shapes to transform nodes
all_objects = cmds.listRelatives(all_objects_shapes, parent=True)
try:
#generate filtered by type list of currently selected objects
filtered_selection = cmds.listRelatives(cmds.ls(selection=True, visible=True), type=types)
#perform "deselect all" operation only in case, when length of "filtered current selection" list is the same as "all objects to selection" list
#in all other cases - "select all" objects from "all objects" list
if len(filtered_selection) == len(all_objects):
cmds.select(clear=True)
else:
cmds.select(all_objects, replace=True)
except TypeError:
cmds.select(all_objects, replace=True)
else:
om.MGlobal.displayError("There is no any object with specified type in scene!")
- Рейтинг
- 4
Здравствуйте. Есть ли у кого такой скрипт, что представлен в видео по типу Spacing Tool в 3DS Max только для Maya
Может быть этот подойдёт:
https://github.com/mmerchante/instanceAlongCurve
- Рейтинг
- 8
Помогите запустить скрипт Nightshade UV,просьба типа "читай хелп" не предлагать.Читал,не получается запустить и все
2) Start up/Restart Maya and in there
write the following in the command
line or the script editor in order to
load up NSUV: import NSUV Make
sure that you enter the command as
Python!
Если можно поподробнее?
2) Start up/Restart Maya and in there
write the following in the command
line or the script editor in order to
load up NSUV: import NSUV Make
sure that you enter the command as
Python!
Если можно поподробнее?
- Рейтинг
- 8
Помогите запустить скрипт Nightshade UV,просьба типа "читай хелп" не предлагать.Читал,не получается запустить и все
2) Start up/Restart Maya and in there
write the following in the command
line or the script editor in order to
load up NSUV: import NSUV Make
sure that you enter the command as
Python!
Если можно поподробнее?
2) Start up/Restart Maya and in there
write the following in the command
line or the script editor in order to
load up NSUV: import NSUV Make
sure that you enter the command as
Python!
Если можно поподробнее?
Запускаем майю, открываем Script Editor
В нижней половине переключаемся на Python и вводим команду:
import NSUV
- Рейтинг
- 8
import NSUV
# pymel.core : Updating pymel with pre-loaded plugins: mayaHIK, GamePipeline, CloudImportExport, tiffFloatReader, bifrostvisplugin, studioImport, ikSpringSolver, ik2Bsolver, xgenToolkit, AbcExport, retargeterNodes, gameFbxExporter, VectorRender, AutodeskPacketFile, OpenEXRLoader, Unfold3D, mayaCharacterization, modelingToolkit, MayaMuscle, rotateHelper, DirectConnect, matrixNodes, AbcImport, BifrostMain, autoLoader, sceneAssembly, gpuCache, Substance, OneClick, shaderFXPlugin, bifrostshellnode, ArubaTessellator, xgenMR, quatNodes, fbxmaya
xgmNurbsPatch [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmNurbsPatch']
# Warning: pymel.internal.apicache : lineage for node xgmNurbsPatch is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmNurbsPatch'] #
xgmSubdPatch [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSubdPatch']
# Warning: pymel.internal.apicache : lineage for node xgmSubdPatch is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSubdPatch'] #
xgmArchiveGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmArchiveGuide']
# Warning: pymel.internal.apicache : lineage for node xgmArchiveGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmArchiveGuide'] #
xgmCardGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmCardGuide']
# Warning: pymel.internal.apicache : lineage for node xgmCardGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmCardGuide'] #
xgmSphereGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSphereGuide']
# Warning: pymel.internal.apicache : lineage for node xgmSphereGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSphereGuide'] #
xgmSplineGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSplineGuide']
# Warning: pymel.internal.apicache : lineage for node xgmSplineGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSplineGuide'] #
# Error: MelArgumentError: file C:\Program Files\Autodesk\Maya2016\Python\lib\site-packages\pymel\core\language.py line 906: Error during execution of MEL script: texSculptCacheContextOptionsPopup(); // 2016 SP1 fix
"C:/Users/Flash_Royal/Documents/maya/2016/scripts/NSUV/panel.mel" line 2347.43: Wrong number of arguments on call to texSculptCacheContextOptionsPopup.
Script:
source "NSUV/panel.mel"; #
У меня вот такая херня выходит
# pymel.core : Updating pymel with pre-loaded plugins: mayaHIK, GamePipeline, CloudImportExport, tiffFloatReader, bifrostvisplugin, studioImport, ikSpringSolver, ik2Bsolver, xgenToolkit, AbcExport, retargeterNodes, gameFbxExporter, VectorRender, AutodeskPacketFile, OpenEXRLoader, Unfold3D, mayaCharacterization, modelingToolkit, MayaMuscle, rotateHelper, DirectConnect, matrixNodes, AbcImport, BifrostMain, autoLoader, sceneAssembly, gpuCache, Substance, OneClick, shaderFXPlugin, bifrostshellnode, ArubaTessellator, xgenMR, quatNodes, fbxmaya
xgmNurbsPatch [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmNurbsPatch']
# Warning: pymel.internal.apicache : lineage for node xgmNurbsPatch is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmNurbsPatch'] #
xgmSubdPatch [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSubdPatch']
# Warning: pymel.internal.apicache : lineage for node xgmSubdPatch is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmPatch', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSubdPatch'] #
xgmArchiveGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmArchiveGuide']
# Warning: pymel.internal.apicache : lineage for node xgmArchiveGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmArchiveGuide'] #
xgmCardGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmCardGuide']
# Warning: pymel.internal.apicache : lineage for node xgmCardGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmCardGuide'] #
xgmSphereGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSphereGuide']
# Warning: pymel.internal.apicache : lineage for node xgmSphereGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSphereGuide'] #
xgmSplineGuide [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSplineGuide']
# Warning: pymel.internal.apicache : lineage for node xgmSplineGuide is cyclical: [u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmGuide', u'containerBase', u'entity', u'dagNode', u'shape', u'geometryShape', u'deformableShape', u'controlPoint', u'surfaceShape', u'THsurfaceShape', u'xgmSplineGuide'] #
# Error: MelArgumentError: file C:\Program Files\Autodesk\Maya2016\Python\lib\site-packages\pymel\core\language.py line 906: Error during execution of MEL script: texSculptCacheContextOptionsPopup(); // 2016 SP1 fix
"C:/Users/Flash_Royal/Documents/maya/2016/scripts/NSUV/panel.mel" line 2347.43: Wrong number of arguments on call to texSculptCacheContextOptionsPopup.
Script:
source "NSUV/panel.mel"; #
У меня вот такая херня выходит
Мега полезный скрипт, который правит вертекс нормали геометрии под 45 градусов, для юзания тайловых декалей.
Выделяем эйдж луп и запускаем скрипт
https://github.com/SindreOpsahl/edgeLord.py
Ссылка на сохраненный источник с примером. Спустя несколько дней, тред был удален по просьбе автора, по причине NDA.
http://webcache.googleusercontent.com/search?q=cache:kGcwoYXItGQJolycount.com/discussion/160770/normals-from-edgeloop-s-script-for-those-lovely-edge-decals &cd=1&hl=ru&ct=clnk&gl=ru
Выделяем эйдж луп и запускаем скрипт
https://github.com/SindreOpsahl/edgeLord.py
Ссылка на сохраненный источник с примером. Спустя несколько дней, тред был удален по просьбе автора, по причине NDA.
http://webcache.googleusercontent.com/search?q=cache:kGcwoYXItGQJolycount.com/discussion/160770/normals-from-edgeloop-s-script-for-those-lovely-edge-decals &cd=1&hl=ru&ct=clnk&gl=ru
Вложения
-
223,1 КБ Просмотров: 599
-
208,5 КБ Просмотров: 622
-
4,2 МБ Просмотров: 593
Последнее редактирование:
это что? зачем вообще?
А вот картинки, что б было понятнее, что такое тайловые декали.
Вложения
-
232,8 КБ Просмотров: 541
-
213,2 КБ Просмотров: 515
-
2,2 МБ Просмотров: 610
Последнее редактирование: