Users browsing this thread: 4 Guest(s)
Struggle's Scripts
#1
Big Grin 
Now, this isn't necessarily a game or a engine, but rather place for showing off my scripts to assist with a submission, or just adding a submission to your thread. Smile

For most of these, you'll need to have Python 2.7 installed. It allows the scripts to be run without being compiled and you guys can see the code if you need help with your own app. (and you can use it on a Mac or a Linux computer! Big Grin)

Scripts:

TGA to PNG Converter (Progress: 100% (Might add other formats to convert to!)) - Download
--------------------------
Ever had a bunch of textures and wanted to submit them to the resource, but they're in the TGA format? Not to worry. This script allows you to convert a folder full of .tga files to the .png format. And it keeps the transparencies!

Thread-Submission Modifier (Progress: 100%) - Download
--------------------------
This was previously a project in C# that I was working on, but now, it's a Python project. Basically this program asks you for a submission type, you put in the information it asks for, like the submission name and it spits out BBCode Cute

Icon Resizer (Progress: 50% - Working on the code to modify size, Plan to add in a image uploader to my server) - Not finished - No Download
--------------------------
Ever had a bunch of renders of your rips and wanted to make big and small icons out of them? With this, it is very easy. You just put in if you want a big or small icon and then it creates it. Then you'll have the option to upload it to my server where it'll give you a direct link to the file Cute
--------------------------

[Proof of Concept] Program Updater (Progress: 100%) - Download
--------------------------
This is just a proof of concept of how developers could update to newer versions
using Python's available modules. It surely could be adapted on to create something
more streamlined or better to fit more people's needs. I only wrote this so that
people could have a decent updater.
The way this works is that it downloads a text file called new_update, and compares
it to an existing file called original_version. It then downloads the update
and copies the new_update text file over the original_version text file.

TextureView (Progress: 100%) - Download
--------------------------
This was just a check of Pygame's implementation on displaying sprites and textures. In order to view the sprites/textures, just put them in the imageLoad folder. Make sure that they're .png!

Requires PyGame!
--------------------------

If you guys see anything in the code I overlooked or found some bug, post it here, please. This helps me to create better and better code, while helping you guys have a more convenient process. You can also modify the code and redistribute it as your own, as long as you give credit where credit is due (see the credits section!) Thanks to all who help by viewing the thread! Big Grin

Credits
--------------------------
The guys at the Python Imaging Library: For creating a flexible and lightweight library for a lot these apps (Want to help? Go here to the GitHub source!)
DarkPika from Tcll5850: For helpful pointers, help, and just being a good friend (lul)
Someone else I missed?

My thanks to you!
--------------------------
Reply
#2
Heh, added 2 of my scripts Big Grin
Reply
Thanked by:
#3
(12-12-2014, 09:38 PM)ThatStruggleThough Wrote: Basically, this is a program that allows you to add a bunch of submissions quicker.

Not really understanding what this means. Your mention of BBCode seems to suggest it's something about posting, is this to make linking to submissions easier for submitters?

Also the description of Icon Resizer isn't very sufficient either. Is it so that you can resize big model icons to the small version?
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Reply
Thanked by:
#4
(12-13-2014, 12:19 AM)puggsoy Wrote:
(12-12-2014, 09:38 PM)ThatStruggleThough Wrote: Basically, this is a program that allows you to add a bunch of submissions quicker.

Not really understanding what this means. Your mention of BBCode seems to suggest it's something about posting, is this to make linking to submissions easier for submitters?

Also the description of Icon Resizer isn't very sufficient either. Is it so that you can resize big model icons to the small version?

For the Thread-Submission Modifier, it just basically asks you what type of submission you did, you put in the information, and it spits out BBCode for your thread Big Grin

And for the Icon Resizer, you have a folder with renders of your model or whatever and you choose if you want a small icon size or a big one, and then it resizes all the files in the folder Smile I'll be changing the first post to clarify Wink
Reply
Thanked by: puggsoy
#5
why resize when you have Picasa Tongue

[Image: pikachu_render_by_hikarichan95-d4jr57z.png]
[Image: pikachu_render_by_hikarichan95-d4jr57z.png]
[Image: pikachu_render_by_hikarichan95-d4jr57z.png]
[Image: pikachu_render_by_hikarichan95-d4jr57z.png]

^exact same image

EDIT:
also, I keep telling you Pillow (click) is the update to PIL Tongue
PIL is DEAD! lol

I'm using Pillow in my program where I mentioned support for ~50 formats:
[Image: Screenshot%2520from%25202014-11-13%25201...253A40.png]
^fun fact: pillow is actually imported with a UMC library then forwarded to a UMC script (cause you're not supposed to use 'import' in UMC scripts) Tongue

and yes, it's portable, as long as you download the egg and add it to the sys.path()
(I don't have it integrated with my interpreter in UMC)
Reply
Thanked by:
#6
(12-13-2014, 11:21 AM)Tcll Wrote: why resize when you have Picasa Tongue

[Image: pikachu_render_by_hikarichan95-d4jr57z.png]
[Image: pikachu_render_by_hikarichan95-d4jr57z.png]
[Image: pikachu_render_by_hikarichan95-d4jr57z.png]
[Image: pikachu_render_by_hikarichan95-d4jr57z.png]

^exact same image

EDIT:
also, I keep telling you Pillow (click) is the update to PIL Tongue
PIL is DEAD! lol

I'm using Pillow in my program where I mentioned support for ~50 formats:
[Image: Screenshot%2520from%25202014-11-13%25201...253A40.png]
^fun fact: pillow is actually imported with a UMC library then forwarded to a UMC script (cause you're not supposed to use 'import' in UMC scripts) Tongue

and yes, it's portable, as long as you download the egg and add it to the sys.path()
(I don't have it integrated with my interpreter in UMC)

I actually do plan to update to Pillow Cute
Reply
Thanked by:
#7
Created a update script. It's a proof of concept Cute
Reply
Thanked by:
#8
here's a little trickery for ya:

>>> staack = {}
>>> stack[0] = {}
>>> stack[5] = {}
>>> stack[2] = {}
>>> stack[4] = {}
>>> list(reversed([ _k for _k in stack ]))
[ 5, 4, 2, 0 ]

I'm doing this for my GUI's stack as I need to draw from top to bottom.
(it doesn't matter if there's missing layers such as 3 or 1)

what the stack does is draw the GUI with only a single transparency affection, so the buttons on the UI aren't affected by the BG, and display the model as they're supposed to Smile
[Image: banner.PNG]
Reply
Thanked by:
#9
(12-29-2014, 05:21 PM)Tcll Wrote: here's a little trickery for ya:

>>> staack = {}
>>> stack[0] = {}
>>> stack[5] = {}
>>> stack[2] = {}
>>> stack[4] = {}
>>> list(reversed([ _k for _k in stack ]))
[ 5, 4, 2, 0 ]

I'm doing this for my GUI's stack as I need to draw from top to bottom.
(it doesn't matter if there's missing layers such as 3 or 1)

what the stack does is draw the GUI with only a single transparency affection, so the buttons on the UI aren't affected by the BG, and display the model as they're supposed to Smile
Oh I see... You create an array and navigate to existing layers and then draw the model, as it's supposed to be, right?
Reply
Thanked by:
#10
eh... uhh... it's rather complex... heh
look at GUI.py, line 1049 in __DrawGUI()
https://copy.com/pDilAtFDy2AoMGkt

right now I'm using an older method which kinda relies on order...
but that code I posted earlier was an idea I intend to use

list(reversed()) is slow though >.>

won't matter too much though once I redo the draw-code to recompile a display list on UI-update Cute

EDIT:
line number and function is no longer valid.
the code has been moved to the _recompile function.

EDIT2:

btw, here's a note for ya Smile

try is faster than if, but except is majorly slower than else.
use these wisely as they can have a BIG impact on your program's performance.

EDIT3:
I've created a thread you might find useful on my forum
[Image: banner.PNG]
Reply
Thanked by:
#11
Updated the tga to png script

Now you use a Folder dialog to search for the folder, and it automatically starts the code over until you close the program. Smile
Reply
Thanked by:
#12
Update! The TGA to PNG script is now recursive. It'll take a root folder and search all the other folders inside and convert them Smile
but the tga delete doesn't work any more Sad
Reply
Thanked by:
#13
Added textureView! Who knows, it might get better Smile
Reply
Thanked by:


Forum Jump: