kristiker / keyvalues3

Source2 KeyValues3 library for Python
https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/KeyValues3
MIT License
13 stars 0 forks source link

This file #5

Closed kristiker closed 1 year ago

kristiker commented 1 year ago
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
{
    geometry = "AdnQywADAAD/////////+QAABgAAAAM4AAABwAAAAKwAAAfCAAAD9gAAAAACAAAABgAAAAAAAAAAFwAABf8AAAM3"
    state = "AAAA/wAAAAH9AAAAAwAAAAAAAALBAAAB+/wCAAAAAfwAAABCAAAB+wAAAFoA/////AEAAAAC/AAAAAQAAADJAAAAewD////6AAAAAAIAAAAB+wAAACAATQBvAGQAZQBsAEQAbwBjAE8AdQB0AGwAaQBuAGUAcgEAAAAA/////wAAABIA/////AAAANMAAAHyAAAAewD////6AAAAAAEAAAAC+wAAACQATQBvAGQAZQBsAEQAbwBjAE4AbwBkAGUARQBkAGkAdABvAHIBAAAAAP////8AAABDAP////sAAAAmAE0AbwBkAGUAbABEAG8AYwBVAG4AZABvAEgAaQBzAHQAbwByAHkBAAAAAP////8AAAASAP///wAAAAEAAAEYAAAB+/wCAAAAAfwAAABCAAAB+wAAACkBAAAW+gAAAAACAAAAAfsAAAAoAE0AbwBkAGUAbABQAHIAZQB2AGkAZQB3AE8AdQB0AGwAaQBuAGUAcgEAAAAA/////wAAABIA////AAAAAwAABfgAAADA/AEAAAAC/AAAAAQAAANaAAAAewD////6AAAAAAEAAAAB+wAAACAATQBvAGQAZQBsAEQAbwBjAFQAaQBtAGUAbABpAG4AZQEAAAAA/////wAAABIA/////AAAA2QAAAKYAAAAewD////6AAAAAAEAAAAF+wAAADYATQBvAGQAZQBsAEQAbwBjAFAAcgBlAHYAaQBlAHcAUwBlAHEAdQBlAG4AYwBlAEwAaQBzAHQBAAAAAP////8AAAASAP////sAAAA2AE0AbwBkAGUAbABEAG8AYwBQAHIAZQB2AGkAZQB3AFMAZQBxAHUAZQBuAGMAZQBMAGkAcwB0AQAAAAD/////AAAAEgD////7AAAAOABNAG8AZABlAGwARABvAGMAUAByAGUAdgBpAGUAdwBNAG8AcAByAGgARQB4AHAAbABvAHIAZQByAQAAAAD/////AAAAEgD////7AAAAKgBNAG8AZABlAGwARABvAGMAQgBvAG4AZQBNAGUAcgBnAGUAVABvAG8AbAEAAAAA/////wAAABIA////+wAAACoATQBvAGQAZQBsAEQAbwBjAE4AbwBkAGUAVwBvAHIAawBzAGgAZQBlAHQBAAAAAP////8AAABDAP///wAAAhMAAAH7AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAABIAE0AbwBkAGUAbABEAG8AYwBFAGQAaQB0AG8AcgBTAGUAcwBzAGkAbwBuAFMAZQB0AHQAaQBuAGcAcwBUAG8AbwBsAGIAYQByAQAAAAD/////AAAAAAAAAAAAAAA4AE0AbwBkAGUAbABEAG8AYwBFAGQAaQB0AG8AcgBQAHIAZQB2AGkAZQB3AFQAbwBvAGwAYgBhAHIBAAABR/////8AAAAAAAAAAA=="
    floating = null
    dockwidgetsvisibility = null
    General = 
    {
        "Closed Correctly" = false
        "Time Between Saves" = 15
        "Max Autosave Space 2" = 2000
        "Max Saves Per Map" = 5
        "Load Autosave On Crash" = true
        "Autosaves Enabled" = true
    }
    RecentFiles = 
    {
        "Filename 0" = "C:\\Users\\user\\Documents\\s&box projects\\stuff\\maps\\test\\scale\\worldnodes\\node000_lr0_b0_s_cb_mesh_base.vmdl"
        "ClosedCorrectly 0" = false
        "Autosaved 0" = false
        "DisplayInList 0" = true
        "Filename 1" = "c:\\users\\user\\documents\\s&box projects\\stuff\\maps\\test\\scale\\worldnodes\\node000_lr0_b1_s_cb_mesh_blocklight.vmdl"
        "ClosedCorrectly 1" = false
        "Autosaved 1" = false
        "DisplayInList 1" = true
        "Filename 2" = "C:\\Users\\user\\Documents\\s&box projects\\stuff\\test.vmdl"
        "ClosedCorrectly 2" = false
        "Autosaved 2" = false
        "DisplayInList 2" = true
    }
    NewFiles = null
    BaseEditor = 
    {
        LastLoadDirectory = "C:/Users/user/Documents/s&box projects/stuff/maps/test/scale/worldnodes"
        LastSaveDirectory = "C:\\Users\\user\\Documents\\s&box projects\\stuff"
    }
    EditorSettings = 
    {
        GroundPlane = 
        {
            drawGroundAndAxis = false
            groundPlaneEnabled = true
            groundPlaneWireframe = false
            treadmillEnabled = true
            axisOriginEnabled = true
            groundSize = 200.0
            groundGridScale = 10.0
            groundHeight = 0.0
            axisOriginSize = 10.0
            modelRotationSnap = false
            modelRotationSnapAngle = 45.0
        }
        Animation = 
        {
            showAbsoluteFrameNumbers = false
            showAnimationHUD = false
            previewAnimationEvents = true
            showRawIKLocks = false
            limitPlayback = true
        }
        Rendering = 
        {
            renderWireframe = false
            drawShadows = true
            drawSkybox = true
            showFPS = false
            showRenderingInfo = false
            showPhysicsInfo = false
            showModifierWarning = true
            showNormals = false
            showTangents = false
            normalSize = 1.0
            lightRig = ""
            toolsVisMode = "None"
            tonemappingMode = 0
            tonemappingScale = 0.0
            cameraFOV = 60
            showModelConfig = true
            showAllAttachments = false
            showAllHitboxes = false
            showAllConstraints = false
            showAllJiggleBones = false
            showAllClothShapes = false
            showAllPhysicsJoints = false
            showAllPhysicsShapes = false
            physicsHighlightSilhouette = false
            physicsHideSourceMesh = false
        }
        Skeleton = 
        {
            showSkeleton = false
            showBoneLines = true
            showBoneNames = false
            showBonePositionsLabels = false
            showBoneEnds = false
            showAxisOnAllBones = false
            showClothBones = false
            boneAxisSize = 1.0
            boneEndSize = 0.3
        }
        Cloth = 
        {
            physicsSelfCollision = false
            showCloth = false
            showSimulatedCloth = false
            simulatedClothColorRenderChannel = 0
            showParticleCollisionSpheres = true
            showParticleStrayRadii = false
            showGoalCloth = false
            showTrajectoryTrails = false
            showClothBendConstraints = false
            showClothWireframe = false
            clothXRay = 0.0
            clothPressureForceScale = 0.0
            clothGoalTween = 0.0
            showClothNormals = false
            showClothVolumetricElements = false
            resetSimOnLoop = false
            simulateClothDuringPause = false
            clothHideRenderTriangles = false
            clothColor = 4292664520
            clothCollider0Color = 4283469030
            clothCollider1Color = 4280837290
            clothIgnoreTreadmill = false
            clothGroundCollision = false
        }
        Export = 
        {
            exportUseCurrentPose = true
            exportMaterials = true
            exportEmbedTextures = true
            exportUnit = 0
            exportCustomScale = 1.0
            exportNameFilter = ""
            exportLastDir = ""
        }
    }
}
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\keyvalues3\kv3file.py", line 35, in __init__
    kv3.check_valid(self.value)
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\keyvalues3\keyvalues3.py", line 77, in check_valid
    check_valid(nested_value)
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\keyvalues3\keyvalues3.py", line 76, in check_valid
    raise ValueError(f"dict key '{key}' is not accepted (not a valid identifier)") # TODO: spaces and . are allowed
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: dict key '"Closed Correctly"' is not accepted (not a valid identifier)
kristiker commented 1 year ago

Fixed in 08a0139ac73466ba32562007d532b7e3cee46b78. Need to make a release