Rules of command plugins
NOTE:
This is a section under construction. The translator has very little knowledge of programming, and so there may be some strange wording or outright inaccuracies. Please be patient as it is corrected.
MikuMikuPlugin.ICommandPlugin Rules for the interface
The entries below marked with "*Implementation required" are things which must be implemented by the plugin developer.
Without implementing all of these marked articles, the plugin will not function properly.
System.Windows.Forms.IWin32Window ApplicationForm { get; set; }
The form handle for the MikuMikuMoving application itself.
The value is given by on the MikuMikuMoving application side.
Please use either dialog or message box display.
MikuMikuPlugin.ICommandAPI API { get; set; }
An API supported by the plugin.
It is supported from the MikuMikuMoving application side.
The plugin uses this to access MikuMikuMoving. Its use will be described later.
string Description { get; }
*Implementation required
Describes information such as the plugin name, author, version number, explanation, etc.
It is displayed as a tooltip on ribbon interface buttons.
System.Drawing.Image Image { get; }
*Implementation required
This is the image displayed by a ribbon interface button.
The optimal image size is 32x32 pixels.
If you use null, the default image will be used.
System.Drawing.Image SmallImage { get; }
*Implementation required
This is the image displayed by a command bar button.
It is optimized for 20x20 pixel images.
If you use null, the default image will be used.
string Text { get; }
*Implementation required
Governs the text displayed on a button of the ribbon interface in Japanese mode.
Can display up to two lines of text. Please use Environment.NewLine when declaring a new text line.
Please avoid using long text so as to uphold the condition of the interface layout.
string EnglishText { get; }
*Implementation required
Governs the text to be displayed outside of Japanese mode.
Everything else is identical to Text Properties.
void Run()
*Implementation required
This is the plugin itself.
It is run when the plugin button is pressed.
void Dispose()
*Implementation required
Runs when the plugin crashes.
Release this if there is an object that must be released from .NET management.
MikuMikuPlugin.ICommandAPI
This is the API interface used by the command plugin.
string ApplicationVersion { get; }
Retrieves the current application version.
float KeyFramePerSec { get; }
Retrieves the current KeyFPS value.
string Language { get; }
Retrieves the current language.
"ja" Japanese
"en" English
string GetMarkerPosition()
Retrieves the current marker position.
MikuMikuPlugin.ObjectType GetActivateObjectType()
Return value
Currently active object types
Retrieves the current active object's type.
string GetCurrentObjectName()
Return value
The currently active object's name.
Retrieves the name of the currently active object.
string GetCurrentObjectEnglishName()
Return value
English name of the active object.
Retrieves the English name of the active object.
System.Collections.Generic.List<MikuMikuPlugin.Bone> GetBones();
Return value
A bone information list for the current active object.
Retrieves the current active object's bone information list.
int GetStageCount(int boneIndex)
boneIndex
A bone's index value.
Return value
Number of layers applied to a bone frame.
Retrieves the number of applied layers for the bone frame of the specified index.
System.Collections.Generic.List<MikuMikuPlugin.MotionFrameData> GetMotionFrameData(int boneIndex, int stageIndex)
boneIndex
Bone index value
stageIndex
Layer index value
Return value
Motion frame's information list
Retrieves a bone motion frame's information list for the active object.
MikuMikuPlugin.MotionFrameData GetMotionFrameData(int boneIndex, int stageIndex, long frameNumber)
boneIndex
Bone index value
stageIndex
Layer index value
frameNumber
Frame number
Retrieves bone motion frame information for the active object.
This is not limited to keyframes. If it is a frame between keyframes, interpolated motion data is retrieved.
void ReplaceAllMotionFrameData(int boneIndex, int stageIndex, System.Collections.Generic.List<MikuMikuPlugin.MotionFrameData> motionframes)
boneIndex
Bone index value
stageIndex
Layer index value
motionframes
Motion frame information list
Replaces the motion frames of the specified bone and layer of the active object.
All existing motions are deleted, and the old list is replaced with a new one.
Note that there is no need to sort the contents of the list.
void SetMotionFrameData(int boneIndex, int stageIndex, long frameNumber, MikuMikuPlugin.MotionFrameData motionframe)
boneIndex
Bone index value
stageIndex
Layer index value
frameNumber
Frame number
motionframe
Motion frame information
Adds motion frame information to a specified bone, layer, or frame of the current active object.
If there is already a keyframe on the target frame, it is overwritten.
void RemoveMotionKeyFrame(int boneIndex, int stageIndex, long frameNumber)
boneIndex
Bone index value
stageIndex
Layer index value
frameNumber
Frame number
Deletes the keyframe of the active object's specified bone, layer, or frame.
Does nothing if no keyframe exists.
System.Collections.Generic.List<Morph> GetMorphs()
Return value
Morph list for the active object.
Retrieves morph information for the active object as a list.
System.Collections.Generic.List<MikuMikuPlugin.MorphFrameData> GetMorphFrameData(int morphIndex)
morphIndex
Morph index value
Return value
Morph frame information list
Retrieves morph motion frame information for the active object as a list.
MikuMikuPlugin.MorphFrameData GetMorphFrameData(int morphIndex, long frameNumber)
morphIndex
Morph index value
frameNumber
Frame number
Retrieves morph frame information for the active object.
This is not limited to keyframes. If it is a frame between keyframes, interpolated motion data is retrieved.
void ReplaceAllMorphFrameData(int morphIndex, System.Collections.Generic.List<MikuMikuPlugin.MorphFrameData> morphframes)
morphIndex
Morph index value
morphframes
Motion frame information list
Replaces motion frame information for a specified morph of the active object.
All existing motions are deleted, and the old list is replaced with a new one.
Note that there is no need to sort the contents of the list.
void SetMorphFrameData(int morphIndex, long frameNumber, MikuMikuPlugin.MorphFrameData morphframe)
morphIndex
Morph index value
frameNumber
Frame number
morphframe
Morph frame information
Adds frame information for a specified morph of the active object at a specified frame.
If a keyframe already exists on the specified frame, it is overwritten.
void RemoveMorphKeyFrame(int morphIndex, long frameNumber)
morphIndex
Morph index value
frameNumber
Frame number
Deletes frame information for the specified morph or frame of the active object.
Does nothing when no keyframe exists.
int GetCameraStageCount()
Return value
Number of a layers applied to the camera
Retrieves the number of layers applied to the camera.
System.Collections.Generic.List<MikuMikuPlugin.CameraFrameData> GetCameraFrameData()
Return value
Camera frame information list
Retrieves camera motion frame information as a list.
MikuMikuPlugin.CameraFrameData GetCameraFrameData(int stageIndex, long frameNumber)
stageIndex
A layer's index value.
frameNumber
Frame number
Retrieves the frame information for camera motions.
This is not limited to keyframes. It can also retrieve data of frames between keyframes, with interpolation applied.
void ReplaceAllCameraFrameData(int stageIndex, List<MikuMikuPlugin.CameraFrameData> cameraframes)
stageIndex
Layer index value
cameraframes
Information list for all camera frames.
Replaces all camera motion frame information.
All existing motions are deleted, and the old list is replaced with a new one.
Note that there is no need to sort the contents of the list.
void SetCameraFrameData(int stageIndex, long frameNumber, MikuMikuPlugin.CameraFrameData cameraframe)
stageIndex
Layer index value
frameNumber
Frame number
cameraframe
Information for a camera frame.
Adds camera motion frame information to a current frame.
If a keyframe already exists on the specified frame, it is overwritten.
void RemoveCameraKeyFrame(int stageIndex, long frameNumber)
stageIndex
Layer index value
frameNumber
Frame number
Deletes a camera keyframe on a specified frame.
Does nothing if no keyframe exists on the specified frame.
int GetLightCount()
Retrieves the number of lights. Currently, it always returns 3.
System.Collections.Generic.List<MikuMikuPlugin.LightFrameData> GetLightFrameData(int lightIndex)
lightIndex
Morph index value
Return value
Morph frame information list
Retrieves motion frame information for the specified light as a list.
MikuMikuPlugin.LightFrameData GetLightFrameData(int lightIndex, long frameNumber)
lightIndex
Light index value
frameNumber
Frame number
Retrieves motion frame information for the specified light.
This is not limited to keyframes. It can also retrieve data of frames between keyframes, with interpolation applied.
void ReplaceAllLightFrameData(int lightIndex, List<MikuMikuPlugin.LightFrameData> lightframes)
lightIndex
Light index value
lightframes
Information list for all light frames
Replaces all motion frame information for the specified light.
All existing motions are deleted, and the old list is replaced with a new one.
Note that there is no need to sort the contents of the list.
void SetLightFrameData(int lightIndex, long frameNumber, MikuMikuPlugin.LightFrameData lightframe)
lightIndex
Light index value
frameNumber
Frame number
lightframe
Light frame information
Adds motion frame information for a specified light at a specified frame.
If a keyframe already exists on the specified frame, it is overwritten.
void RemoveLightKeyFrame(int lightIndex, long frameNumber)
lightIndex
Light index value
frameNumber
Frame number
Deletes a keyframe for a specified light at a specified frame.
Does nothing if there is no keyframe at the specified frame.
MikuMikuPlugin.Bone
Class for bone information.
int Index { get; }
Bone index value.
string Name { get; }
The bone's name
string EnglishName { get; }
The bone's English name
DxMath.Vector3 Position { get; }
The bone's default position.
int ParentBoneIndex { get; }
The index value of the parent bone
MikuMikuPlugin.BoneType BoneFlags { get; }
A flag that denotes a bone's properties.
MikuMikuPlugin.Morph
This is a class that expresses morphs.
int Index { get; }
Morph index value.
string Name { get; }
Morph name
string EnglishName { get; }
Morph English name
MikuMikuPlugin.MorphType MorphType { get; }
Morph types
MikuMikuPlugin.MotionFrameData
DxMath.Vector3 position
Movement
DxMath.Quaternion quaternion
Rotation(quaternion)
MikuMikuPlugin.InterpolatePoint interpolXA
Point A for the X axis movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolXB
Point B for the X axis movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolYA
Point A for the Y axis movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolYB
Point B for the Y axis movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolZA
Point A for the Z axis movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolZB
Point B for the Z axis movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolRA
Point A for the rotational movement value's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolRB
Point B for the rotational movement value's Bezier curve
MikuMikuPlugin.FrameData Clone()
Generates a clone
MikuMikuPlugin.MorphFrameData
A class that expresses morph frame data.
float weight
Weight value
MikuMikuPlugin.InterpolatePoint interpolA
Point A for the morph's Bezier curve
MikuMikuPlugin.InterpolatePoint interpolB
Point B for the morph's Bezier curve
MikuMikuPlugin.FrameData Clone()
複製を作成するGenerates a clone
MikuMikuPlugin.CameraFrameData
DxMath.Vector3 position
Current position of the focal point
DxMath.Vector3 angle
Rotation angle
The value is in radians.
float radian
Distance between the focal point and camera.
float fov
View angle
The value is in radians.
MikuMikuPlugin.InterpolatePoint interpolMoveA
Point A for the movement Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolMoveB
Point B for the movement Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolRoteA
Point A for the rotational Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolRoteB
Point B for the rotational Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolDistA
Point A for the distance Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolDistB
Point B for the distance Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolFovA
Point A for the view angle Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolFovB
Point B for the view angle Bezier curve.
MikuMikuPlugin.FrameData Clone()
Generates a clone
MikuMikuPlugin.LightFrameData
DxMath.Vector3 position
Position
DxMath.Vector3 color
Light color
X:Red Y:Green Z:Blue
Takes values from 0.0 through 1.0.
MikuMikuPlugin.InterpolatePoint interpolPosA
Point A for the positional Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolPosB
Point B for the color Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolColorA
Point A for the positional Bezier curve.
MikuMikuPlugin.InterpolatePoint interpolColorB
Point B for the color Bezier curve.
MikuMikuPlugin.FrameData Clone()
Generates a clone