11/28/14

MAYA _ surface attach/rivet

To create a locator that follow a face, in plugin manager load muscle, select two edges on your mesh, then :
Animation > Muscle > Bonus Rigging > Surface Attach

or use a follicule
vimeo.com/47456885

11/20/14

AFTER EFFECTS _ tips

 To launch a second instance of After effects :
"C:\Program Files\Adobe\Adobe After Effects CC 2015.3\Support Files\AfterFX.exe" -m
type it in cmd (windows) or save it in a .bat file and double click.


Shortcuts

b / n  work area end / start
- / =   zoom in/out timeline
ctrl shift h  Toggle Layer Controls in viewport
shift F4  toggle parent column
F4   toggle column
ctrl a   select all
ctrl shift a / F2  deselect all
ctrl L  lock layer
ctrl shift t   open effect panel for selected layer
ctrl shift p   open dialog box for position of selected layer
ctrl+   increase scale selected layer
ctrl-  decrease scale selected layer
shift F3  toggle graph editor/layer mode
ctrl shift d   split layer according time position
shift + / shift -   change blending mode
[    in point(start) of the layer
]  out point (end) of the layer
Alt Ctrl Shift Split the frame containing the active viewer and create a new  locked viewer
x focus selected layer
Ctrl+Alt+B Set work area to duration of selected layers 
Shift+Esc Toggle between two recent composition
 Ctrl+Alt+U To choose which layer controls to show in a view, shortcut for :  choose View > View Options
Alt+Shift+M Set key on mask path for selected layer
Toggle waveform on timeline

To manually edit/add shortcuts, edit the .txt file located here:
C:\Users\UserName\AppData\Roaming\Adobe\After Effects\*.*\Adobe After Effects *.* Shortcuts.txt
- "ToggleTabPanelMaximize" = "(RParen)"
-  "TimeTrimIn" = "(Ctrl+Alt+Shift+I)"
- "TimeTrimOut" = "(Ctrl+Alt+Shift+O)"
- for azerty keyboard, add "Pad" before numbers ex : 1 -> Pad1

Easy crop comp : select region of interest then composition - crop comp to region of interest
Preserve underlying transparency (small T check) = clipping mask in Photoshop
ctrl + double click pan behind tool = pivot to center

Some expressions
loopOut(type = "continue");
loopOut(type = "cycle", numKeyframes = 2)
loopOut(type = "pingpong", numKeyframes = 2)
loopOut(type = "offset", numKeyframes = 2)

# force fps animation
posterizeTime(8);
value

# round value
Math.round(effect("Slider Control")("Slider")) 
# keep only one decimal
effect("Slider Control")("Slider").value.toFixed(1)

#copy animation from layer and offset time
thisComp.layer(1).position.valueAtTime(time-1)

11/16/14

MAYA / MEL _ flat shaded viewport

edit : Now in Maya 2015 there is an option for that in the viewport -> lighting -> use flat lighting.

I didn't find a simple way to display a flat shaded viewport. So here is a simple script to toggle the viewport with a flat shaded view, usefull to see silouhette when animating. This mel script create a global render layer with a surface shader material override, to change the flat color just modify the surface shader.
// TOGGLE FLAT - using render layer
global proc toggleFlat ()
{
 if (`editRenderLayerGlobals -q -currentRenderLayer` == "defaultRenderLayer")
 { 
  // Check if Render Layer FLat exists or create it
  if (`objExists "RL_FLAT"`)
  {
   editRenderLayerGlobals -currentRenderLayer RL_FLAT;
  }
  else
  {
   createRenderLayer -n "RL_FLAT" -number 1 -makeCurrent -global;

   // SHADER ///
   string $shadName = "SH_FLAT";
   // Check if Shader doesn't exists and create it
   if (!`objExists $shadName`)
   {
    $shader = `shadingNode -n $shadName -asShader surfaceShader`;
    setAttr ($shader + ".outColor") -type double3 0.7 0.7 0.7; 
   } 

   hookShaderOverride("RL_FLAT", "", "SH_FLAT");
   editRenderLayerGlobals -currentRenderLayer RL_FLAT;
  }
  headsUpMessage "FLAT ON";
 }
 else
 {
  editRenderLayerGlobals -currentRenderLayer defaultRenderLayer;
  headsUpMessage "FLAT OFF";
 }
 
}

toggleFlat ();

11/3/14

NUKE _ $gui

- keep subdivision of 3D objects low in GUI, high in render ($gui?10:100)
- keep motion blur sampling low in GUI, high in render ($gui?3:20)
-"$gui" in expressions will return 1 in the UI and 0 at render time. Great for enabling nodes only when rendering on the farm (use it in the disable knob or Switch node).

source

11/2/14

NUKE/PYTHON _ toggle fullscreen viewer

def FullscreenViewer():
 m = nuke.menu( 'Viewer' ).findItem( 'Toolbars/Bottom' )
 m.invoke()
 m = nuke.menu( 'Viewer' ).findItem( 'Toolbars/Top' )
 m.invoke()

11/1/14

NUKE _ find shortcut .py file

Edit shortcut without using menu.py
edit : nukeinstaldir\plugins\nukescripts\toolbars.py