bzwrap: Python Package

General talk about the map making process.
Post Reply
User avatar
tainn
Private First Class
Private First Class
Posts: 204
Joined: Sun Nov 18, 2018 7:25 pm
Location: zone of the phantoms

bzwrap: Python Package

Post by tainn » Sun Apr 19, 2020 5:26 pm

I made a Python package bzwrap (or bzw wrapper) for personal use, but am sharing it in case anyone else might find it useful. It is aimed towards anyone creating maps by hand, but wanting to express themselves in a slightly smaller amount of lines or perhaps want to introduce some logic to their creations.

The package, its code and description can be found in its GitHub repository.

Perhaps as a post scriptum, this is meant to be a straightforward and lightweight package, assisting at elementary levels of map creation by hand. That said, I am open for any pull requests or some other form of contribution, should there be any interest.

User avatar
mathiaz
Private First Class
Private First Class
Posts: 53
Joined: Sat May 27, 2006 11:59 pm

Re: bzwrap: Python Package

Post by mathiaz » Thu Apr 23, 2020 7:19 pm

Nice! I have done something similar. but not enough clean.
The first class is a bloc, with interesting attribute:
- type (meshbox, pyramid..)
- sx, sy, sz (size)
- px, py pz (position)
- shoothrought
- rotation
- name
- option
- color

and methods:

- getSurface
- cloneCtf
- draw
- symetrieAxiale
- translate
- xShift, yShift,zShift
<°)))><|

User avatar
tainn
Private First Class
Private First Class
Posts: 204
Joined: Sun Nov 18, 2018 7:25 pm
Location: zone of the phantoms

Re: bzwrap: Python Package

Post by tainn » Thu Apr 23, 2020 7:34 pm

Hey, mat! Sounds sweet!

Yeah, this package is meant to be very open and non-restrictive, so any type of attribute can be set, even if the attribute itself doesn't exist. I'm considering making a more strict version as well, where the creator is essentially guided on what objects they can create, what attributes those objects can have, as well as what types of values can those attributes then be given.

Post Reply