コード例 #1
0
 public void SetRenderDistancesAll(float value)
 {
     value = Mathf.Clamp(Gizmos.ConvertRoundBackToMeters(value), 50f, 24000f);
     foreach (var obj in POGroup.AllObjectsInSelection(selection, logic.selectedGroup))
     {
         if (!obj.renderDistLocked)
         {
             obj.renderDistance = value;
         }
     }
 }
コード例 #2
0
 public override void OnOpen(List <ProceduralObject> selection)
 {
     selection = POGroup.AllObjectsInSelection(logic.pObjSelection, logic.selectedGroup);
     if (selection.Count <= 1)
     {
         ExitAction();
         return;
     }
     base.OnOpen(selection);
     clipboard = new ClipboardProceduralObjects(ClipboardProceduralObjects.ClipboardType.Selection);
     clipboard.MakeSelectionList(selection, null);
 }
コード例 #3
0
 public override void OnOpen(List <ProceduralObject> selection)
 {
     confirmed      = false;
     this.selection = POGroup.AllObjectsInSelection(selection, logic.selectedGroup);
     if (this.selection.Count < 2)
     {
         ExitAction();
         return;
     }
     oldColors = new Dictionary <ProceduralObject, Color>();
     foreach (var obj in this.selection)
     {
         oldColors.Add(obj, obj.m_color);
     }
     gradientTex = TextureUtils.PlainTexture(100, 22, Color.white);
     maxObjects  = VertexUtils.OutmostPoints(this.selection.ToArray());
     gradient    = new Gradient();
 }
コード例 #4
0
 public override void OnOpen(List <ProceduralObject> selection)
 {
     this.selection = POGroup.AllObjectsInSelection(selection, logic.selectedGroup);
     foreach (var po in this.selection)
     {
         if (po.meshStatus == 1)
         {
             continue;
         }
         try
         {
             po.historyEditionBuffer.InitializeNewStep(EditingStep.StepType.vertices, po.vertices);
             ProceduralUtils.RecenterObjOrigin(po, po.vertices);
             po.ApplyModelChange();
             po.historyEditionBuffer.ConfirmNewStep(po.vertices);
         }
         catch (Exception e)
         {
             Debug.LogWarning("[ProceduralObjects] PO could not recenter object origin of object #" + po.id + " of type " + po.basePrefabName + "\n" + e);
             po.historyEditionBuffer.ConfirmNewStep(po.vertices);
         }
     }
     ExitAction();
 }
コード例 #5
0
 public override void OnOpen(List <ProceduralObject> selection)
 {
     this.selection = POGroup.AllObjectsInSelection(selection, logic.selectedGroup);
 }
コード例 #6
0
 public override void OnOpen(List <ProceduralObject> selection)
 {
     base.OnOpen(selection);
     value           = Gizmos.ConvertRoundToDistanceUnit(GetAvgRenderDistance(POGroup.AllObjectsInSelection(selection, logic.selectedGroup)));
     renderDistInput = new GUIUtils.FloatInputField(value);
 }