Metadata-Version: 2.4
Name: curik-cpythonff
Version: 0.1.0
Summary: a python module for curik place file format
Author-email: poi <poiisawesome1111@gmail.com>
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# 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?


```ini
  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:


```python
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)
```
