GithubHelp home page GithubHelp logo

kristiker / keyvalues3 Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 217 KB

Source2 KeyValues3 library for Python

Home Page: https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/KeyValues3

License: MIT License

Python 100.00%
kv3 source2 valve keyvalues json-like

keyvalues3's People

Contributors

kristiker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

keyvalues3's Issues

This file

<!-- 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)

Make kv3file a dict proxy

Since kv files are 99% of the time dicts, make it possible to use file.keys() in conjunction with file.value.keys().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.