public void AddLine3D() { var gobj = init_drawing(); if (gobj == null) { return; } readPoints_zup_righthand(); radius = gobj.lineAppearance.Peek().radius; frontColor = gobj.lineAppearance.Peek().frontColor; frontColors.Clear(); topology = TOPOLOGY.Open; readModifiers(); gobj.SetLineRadius(radius * POINT_SCALE); gobj.SetLineFrontColor(frontColor); if (topology == TOPOLOGY.Close) { gobj.SetLineTopology(Pen.Topology.Close); } else { gobj.SetLineTopology(Pen.Topology.Open); } gobj.AddLine(points, frontColors); }
private void readModifiers() { while (true) { var modifiers = (MODIFIERS)(readInt()); if (modifiers == MODIFIERS.Color) { readColor(); } else if (modifiers == MODIFIERS.Radius) { radius = readFloat(); } else if (modifiers == MODIFIERS.Colors) { readColors(); } else if (modifiers == MODIFIERS.Topology) { topology = (TOPOLOGY)(readInt()); } else { break; } } }
protected override void DerivedInspector(MotionEditor editor) { Topology = (TOPOLOGY)EditorGUILayout.EnumPopup("Topology", Topology); RightShoulder = EditorGUILayout.Popup("Right Shoulder", RightShoulder, Data.Source.GetBoneNames()); LeftShoulder = EditorGUILayout.Popup("Left Shoulder", LeftShoulder, Data.Source.GetBoneNames()); RightHip = EditorGUILayout.Popup("Right Hip", RightHip, Data.Source.GetBoneNames()); LeftHip = EditorGUILayout.Popup("Left Hip", LeftHip, Data.Source.GetBoneNames()); Neck = EditorGUILayout.Popup("Neck", Neck, Data.Source.GetBoneNames()); Hips = EditorGUILayout.Popup("Hips", Hips, Data.Source.GetBoneNames()); ForwardAxis = (Axis)EditorGUILayout.EnumPopup("Forward Axis", ForwardAxis); Ground = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(EditorGUILayout.MaskField("Ground Mask", InternalEditorUtility.LayerMaskToConcatenatedLayersMask(Ground), InternalEditorUtility.layers)); }
public void AddLine3D() { var gobj = init_drawing(); if (gobj == null) { return; } readPoints_zup_righthand(); if (points.Count == 0) { Manager.DebugLogError("CindyJS::AddLine3D: points.Count is zero"); return; } radius = gobj.lineAppearance.Peek().radius; frontColor = gobj.lineAppearance.Peek().frontColor; frontColors.Clear(); topology = TOPOLOGY.Open; readModifiers(); if (testmode) { Manager.DebugLog("CindyJS::AddLine3D: points = " + points.Count + " idx = " + idx_uc3dBuffer + " bufferlength = " + uc3dBuffer.Length); } gobj.SetLineRadius(radius * POINT_SCALE); gobj.SetLineFrontColor(frontColor); if (topology == TOPOLOGY.Close) { gobj.SetLineTopology(Pen.Topology.Close); } else { gobj.SetLineTopology(Pen.Topology.Open); } gobj.AddLine(points, frontColors); }