a python module for curik place file format
Project description
CPYTHONFF
A python module for Curik Place File Format
What is a CPFF file?
A CPFF file is a file that holds the information for a level in Curik
How is a CPFF file formatted?
obj; 1
nam; Name
pos; 0 0 0
scale; 0 0 0
rot; 0 0 0
color hex; #ffffff
=
The OBJ is the type of model it is:
1 = Cube
2 = Sphere
3 = Cylinder
Name, Position, Scale, Rotation, and Color is self explanatory
The ‘=’ is to separate each object
Example:
import cpythonff
from tkinter import filedialog
filepath = filedialog.askopenfile(
title="select your cpff",
filetypes=[("Curik Place Format File", "*.cpff")]
)
if filepath:
with filepath:
cpff = filepath.read()
# cpythonff.getattr(the contents of the cpff file, object index, attribute)
# cpythonff.totalobjects(the contents of the cpff file, object index)
total_obj = cpythonff.totalobjects(cpff) # example: 917
obj = cpythonff.getattr(cpff, 1, "obj") # example: "cube"
name = cpythonff.getattr(cpff, 1, "name") # example: "Part"
pos = cpythonff.getattr(cpff, 1, "pos") # example: (11.0, -8.0, 0.0)
rot = cpythonff.getattr(cpff, 1, "rot") # example: (5.0, 5.0, 5.0)
scale = cpythonff.getattr(cpff, 1, "scale") # example: (11.0, 9.0, 10.5)
color = cpythonff.getattr(cpff, 1, "color") # example: #f50a05
print(obj)
print(name)
print(pos)
print(rot)
print(scale)
print(color)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
curik_cpythonff-0.1.0.tar.gz
(2.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curik_cpythonff-0.1.0.tar.gz.
File metadata
- Download URL: curik_cpythonff-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a5b991926c12de4a7a9e21b6c6117b6b9bb290102b95322d95d5906e641332d
|
|
| MD5 |
b87b7a4d21ced6875fae920cd790869b
|
|
| BLAKE2b-256 |
9573ae3917b6c345ae108bc47e3d15b2913a4b47e6e92f3222ce4c87bb59fb2b
|
File details
Details for the file curik_cpythonff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: curik_cpythonff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea76618b40595e28973c14dea51b354681774cedd2da5f0beb7bba0f98049c1c
|
|
| MD5 |
716fd2a137ba2c1408bec43421f9d9b3
|
|
| BLAKE2b-256 |
7b3ad124956e36738685394cbd9d6638c22b2f7314f54e52f5a130d33339e88d
|