This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from maya import cmds, mel | |
import sys | |
def follow_camera(): | |
group_name = "followCameraGroup" | |
# Delete Unused Follow Panel And Camera | |
model_panels = cmds.getPanel(type='modelPanel') | |
follow_panels = [] | |
is_run_delete = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from maya.api import OpenMaya as om | |
from maya.api import OpenMayaAnim as oma | |
node = om.MGlobal.getSelectionListByName("animCurveUUのノード名") | |
anim = oma.MFnAnimCurve(node.getDependNode(0)) | |
# (Time, Value) | |
anim.addKey(0., 0.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from maya import cmds | |
from maya import mel | |
THRESHOLD_WEIGHT = 0.5 | |
FIX_WEIGHT = 1.0 | |
can_fix = True | |
selections = cmds.ls(sl=True) or None | |
# 選択物チェック | |
if selections is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( (`window -ex TransformViewerWindow`) == true ) deleteUI TransformViewerWindow; | |
window -title "Transform Viewer" TransformViewerWindow; | |
// Main WIndow | |
scrollLayout -hst 0 -cr true -pe true; | |
columnLayout -adj true; | |
// Transform Attribute | |
for ($snode in `ls -selection`){ | |
frameLayout -collapsable true -label $snode -collapse true -backgroundShade true ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AFrameGrabberActor::Capture() { | |
if (FrameGrabber.IsValid() && CaptureFrameTexture) { | |
FrameGrabber->CaptureThisFrame(FFramePayloadPtr()); | |
TArray<FCapturedFrameData> Frames = FrameGrabber->GetCapturedFrames(); | |
if (Frames.Num()) { | |
FCapturedFrameData& LastFrame = Frames.Last(); | |
CaptureFrameData.Empty(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AFrameGrabberActor::ReleaseFrameGrabber() { | |
if (FrameGrabber.IsValid()) { | |
FrameGrabber->StopCapturingFrames(); | |
FrameGrabber->Shutdown(); | |
FrameGrabber.Reset(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AFrameGrabberActor::StopFrameGrab() { | |
ReleaseFrameGrabber(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AFrameGrabberActor::StartFrameGrab() { | |
TSharedPtr<FSceneViewport> SceneViewport; | |
// Get SceneViewport | |
// ( quoted from FRemoteSessionHost::OnCreateChannels() ) | |
#if WITH_EDITOR | |
if (GIsEditor) { | |
for (const FWorldContext& Context : GEngine->GetWorldContexts()) { | |
if (Context.WorldType == EWorldType::PIE) { | |
FSlatePlayInEditorInfo* SlatePlayInEditorSession = GEditor->SlatePlayInEditorMap.Find(Context.ContextHandle); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AFrameGrabberActor::StartFrameGrab() | |
{ | |
TSharedPtr<FSceneViewport> SceneViewport; | |
// Get SceneViewport | |
// ( quoted from FRemoteSessionHost::OnCreateChannels() ) | |
#if WITH_EDITOR | |
if (GIsEditor) | |
{ | |
for (const FWorldContext& Context : GEngine->GetWorldContexts()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//忘れずに! | |
using System.Runtime.InteropServices; | |
public class HogeClass : MonoBehaviour { | |
[DllImport("__Internal")] | |
private static extern void OpenToBlankWindow(string _url); | |
//略 |
NewerOlder