{ "info": { "author": "Philip Meier", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# VMTlib\n\n#### Description:\n\nVMTlib is a simple parser for Valve Material Type (.vmt) files.\n\n#### Note:\n> 1. At the moment this package doesn't support attribute key-value pairs\n> separated by tabs.\n> 2. The formatting of the write function is very basic.\n\n#### Basic Usage:\n###### Import\n```python\nfrom vmtlib.vmt_file import VmtFile\n```\n\n###### Reading\n```python\nvmtf = VmtFile(\"example.vmt\")\nvmtf.read()\n```\n###### Writing\n```python\nvmtf.write(\"path/to/target.vmt\")\n```\n\n###### Accessing Objects and Attributes\n```python\n# Attributes\nbasetexture = vmtf.shader.get(\"$baseTexture\")\n# or\nbasetexture = vmtf.shader.attributes[\"$baseTexture\"]\n\n# Objects\nproxy_obj = vmtf.shader.get(\"Proxies\")\n#or\nproxy_obj = vmtf.shader.childs[\"Proxies\"]\n```\n###### Setting Attributes\n```python\nvmtf.shader.set(\"$basetexture\", \"new_texture\")\n```\n###### Getting the structure as dictionary:\n```python\nd = vmtf.shader.dict\n```\n###### Creating a VMT file from a dictionary:\n```python\nd = {\"shader\": {\"$basetexture\": \"brick\", \"Proxies\": {\"key\": \"val\"}}}\nvmtf = VmtFile()\n\nvmtf.from_dict(d)\n```\n###### Getting the filename and directory:\n```python\nfilename = vmtf.filename\ndir = vmtf.directory\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/megaprokoli/vmtlib", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "vmtlib", "package_url": "https://pypi.org/project/vmtlib/", "platform": "", "project_url": "https://pypi.org/project/vmtlib/", "project_urls": { "Homepage": "https://github.com/megaprokoli/vmtlib" }, "release_url": "https://pypi.org/project/vmtlib/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A simple parser for Valve Material Type (.vmt) files.", "version": "0.0.1" }, "last_serial": 5752977, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1991c4b9fb726116e605dbfd7967a358", "sha256": "604f987cdbb0dd3dc063b9ae8b656049c5423ce534752114d8a389a1d8d10c87" }, "downloads": -1, "filename": "vmtlib-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1991c4b9fb726116e605dbfd7967a358", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4576, "upload_time": "2019-08-29T14:23:38", "url": "https://files.pythonhosted.org/packages/1c/0a/92f6cf0243aef07bac65cda8b384e31a0b31bb2e20ed41fd0798381f96e6/vmtlib-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efc88073d867544c95652eac61293f64", "sha256": "0c0e1395c1a44b217e5a3f38e8d1c892a87e93f1876d0b1840bdf27d86c2eb59" }, "downloads": -1, "filename": "vmtlib-0.0.1.tar.gz", "has_sig": false, "md5_digest": "efc88073d867544c95652eac61293f64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3220, "upload_time": "2019-08-29T14:23:40", "url": "https://files.pythonhosted.org/packages/e4/c5/6dc82ad54b588a1af8070f2306e3667b59a4336c82a033e54a1383dffc14/vmtlib-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1991c4b9fb726116e605dbfd7967a358", "sha256": "604f987cdbb0dd3dc063b9ae8b656049c5423ce534752114d8a389a1d8d10c87" }, "downloads": -1, "filename": "vmtlib-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1991c4b9fb726116e605dbfd7967a358", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4576, "upload_time": "2019-08-29T14:23:38", "url": "https://files.pythonhosted.org/packages/1c/0a/92f6cf0243aef07bac65cda8b384e31a0b31bb2e20ed41fd0798381f96e6/vmtlib-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efc88073d867544c95652eac61293f64", "sha256": "0c0e1395c1a44b217e5a3f38e8d1c892a87e93f1876d0b1840bdf27d86c2eb59" }, "downloads": -1, "filename": "vmtlib-0.0.1.tar.gz", "has_sig": false, "md5_digest": "efc88073d867544c95652eac61293f64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3220, "upload_time": "2019-08-29T14:23:40", "url": "https://files.pythonhosted.org/packages/e4/c5/6dc82ad54b588a1af8070f2306e3667b59a4336c82a033e54a1383dffc14/vmtlib-0.0.1.tar.gz" } ] }