UNDO problem (TIP)
I noticed a problem with the UNDO command.
Sometimes, you need to press a few times Ctrl+Z before the operation will be canceled.
If it drives you crazy - that's three things that should help.
- Close the Reference Editor window.
- Check what is written in Command Response strip or Script Editor when doing UNDO.
If there is an inscription - isolateSelect-loadSelected modelEditor1;
do mel command:
isolateSelect -state 0 modelEditor1;(where "modelEditor1" is the same name as in response command) - Switch the Show-> Isolate View -> "auto load selected objects"
Separate namespace from selection (PYTHON)
import maya.cmds as maya
selected = maya.ls(sl=1)
splitedNames = selected[0].split(":")
obj = splitedNames.pop()
namespace = ':'.join(splitedNames)
selected = maya.ls(sl=1)
splitedNames = selected[0].split(":")
obj = splitedNames.pop()
namespace = ':'.join(splitedNames)
After the operation you'll get two variables:
obj - is a name of selected object
namespace - is a string containing the namespace
Remember to join both variables by +":"+
Delete/Select animation curves (MEL)
The script allows you to delete all the animation curves produced during the setting of the skin cluster:
$selected = `ls -typ animCurveTL -typ animCurveTA -typ animCurveTU `;
delete $selected;
delete $selected;
Also useful when you need to select and move all animation:
$selected = `ls -typ animCurveTL -typ animCurveTA -typ animCurveTU `;
select $selected;
select $selected;
Toggle "SnapToFrame" (Hotkey)
ALT + C
{
int $snapState = `timeControl -q -snap $gPlayBackSlider`;
if ($snapState==1)
{timeControl -e -snap false $gPlayBackSlider;}
else
{timeControl -e -snap true $gPlayBackSlider;}
}
int $snapState = `timeControl -q -snap $gPlayBackSlider`;
if ($snapState==1)
{timeControl -e -snap false $gPlayBackSlider;}
else
{timeControl -e -snap true $gPlayBackSlider;}
}
Thanks for the snapping toggle script, exactly what I was looking for.
OdpowiedzUsuńIt's nice to know that someone comes here :)
Usuń