Skip to content

Commit

Permalink
Multi slots + new elemOrient type (#471)
Browse files Browse the repository at this point in the history
* Use Utils.ParseVectorX for pos/rot/size in generators; Use new syntax for dummy values in ReadFromJson

* Fix issue with spaces in given vectors

* description as a string

* Adapt GUIObjectInfos for new description format

* Fix crashes related to new size format

* Simplify GUIObjectInfos.UpdateFields()

* Rename SMargin components; areas as vector4

* Fix areas command parsing

* Fix scrollbar issue in infos panel

* Simplify DisplayObjectData.SetLabel()

* Simplify DisplayObjectData.SetLabel() & fix face text with rack's name

* Parse new slot format (but placement issue with multi slots)

* Fix horizontal slots position

* objects from API no longer have empty attributes

* Adapt to new STemplateChild.elemOrient type

* Fix devices orientation when placed in slot

* Fix issue when getting template on a non-templated generic object

* Update build date, typo & doc

* Better check in dictionnaries

* Remove outdated attribute modifications for templated racks

* Fix device position in front orientation in slot

* Update build date & commit nb
  • Loading branch information
Cedrok authored Feb 23, 2024
1 parent bdca152 commit aa76c16
Show file tree
Hide file tree
Showing 8 changed files with 160 additions and 91 deletions.
68 changes: 60 additions & 8 deletions Assets/Prefabs/Rack.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 382823270839367371}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4012234162031736588}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!205 &7128627431715475119
LODGroup:
Expand Down Expand Up @@ -66,10 +67,21 @@ Rigidbody:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 382823270839367371}
serializedVersion: 2
serializedVersion: 4
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
Expand All @@ -91,8 +103,9 @@ MonoBehaviour:
id: 0
parentId: 0
category:
description: []
description:
domain:
tags: []
attributesKeys: []
attributesValues: []
currentLod: 0
Expand All @@ -103,15 +116,39 @@ MonoBehaviour:
scatterPlot: 0
localCS: {fileID: 0}
isDoomed: 0
LodLocked: 0
isLodLocked: 0
color: {r: 0, g: 0, b: 0, a: 0}
isHidden: 0
isComponent: 0
referent: {fileID: 0}
tempBar: {fileID: 0}
temperatureUnit:
hasSlotColor: 0
clearanceHandler:
front:
length: 0
direction: {x: 0, y: 0, z: 0}
rear:
length: 0
direction: {x: 0, y: 0, z: 0}
left:
length: 0
direction: {x: 0, y: 0, z: 0}
right:
length: 0
direction: {x: 0, y: 0, z: 0}
top:
length: 0
direction: {x: 0, y: 0, z: 0}
bottom:
length: 0
direction: {x: 0, y: 0, z: 0}
clearedObject: {fileID: 0}
isToggled: 0
isInitialized: 0
clearanceWrapper: {fileID: 0}
clearances: []
uRoot: {fileID: 0}
gridForULocation: {fileID: 0}
areUHelpersToggled: 0
--- !u!114 &5666233796082005944
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -162,6 +199,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 11599482bb3741f4b890d546eeba923f, type: 3}
m_Name:
m_EditorClassIdentifier:
isTemplate: 0
scatterPlotOfOneParent: 0
isHidden: 0
isHiddenInGroup: 0
isHighlighted: 0
--- !u!1 &4012234162031736584
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -188,12 +230,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012234162031736584}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.6, y: 1.8, z: 1.2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5362207936512041789}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4012234162031736587
MeshFilter:
Expand All @@ -214,6 +257,7 @@ MeshRenderer:
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
Expand Down Expand Up @@ -252,8 +296,16 @@ BoxCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4012234162031736584}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
8 changes: 4 additions & 4 deletions Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -9252,9 +9252,9 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 'Build date: 2024-02-15
m_text: 'Build date: 2024-02-23

Commit #8d4cecc'
Commit #592a236b'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 79459efec17a4d00a321bdcc27bbc385, type: 2}
Expand Down Expand Up @@ -24037,8 +24037,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 741869394}
m_HandleRect: {fileID: 741869393}
m_Direction: 0
m_Value: 1
m_Size: 0.99999994
m_Value: 0
m_Size: 0.99999964
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Enums_Strucs/SDataFromJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public struct STemplateChild
{
public string location;
public string type;
public string elemOrient;
public float[] elemOrient;
public float[] elemPos;
public float[] elemSize;
public string labelPos;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/OgreeClasses/Slot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class Slot : MonoBehaviour
{
public bool used = false;
public string orient;
public float[] orient;
public bool isU;
public string formFactor;
public string labelPos;
Expand Down
Loading

0 comments on commit aa76c16

Please sign in to comment.