View Single Post
# 4 06-12-2011 , 02:17 PM
Jouri's Avatar
Lone Wolf Productions
Join Date: Nov 2011
Location: Belgium, Antwerp
Posts: 18

Hi Caers,

Your #2 has already been created; https://www.exood4.com/melanie/
Also, you can now use QT's UI builder, so the issue of a UI builder is not really a problem any longer.

To your code:
With your implementation, why are you using so many hex strings? When many programmers see that; it automatically raises a red-flag, as it looks like you're trying to hide something. I'm guessing you're using this to write your files? Why not just code a copier in python, or even a shell script; other than with MEL. Doing it with hex strings will only confuse you; and others.

Anyways, I've tried many of your hex strings, and I keep getting a lot of x'es in the results. For example:

binascii.unhexlify('20202020202020202d636f6d6d616e 642078c978736f757263652078cc7878c97854657374205363 72697074203030312e6d656c78cc7878c9783b78cc786e78c9 782078c878')

' -command x\xc9xsource x\xccxx\xc9xTest Script 001.melx\xccxx\xc9x;x\xccxnx\xc9x x\xc8x'

And just to be clear; your first post makes it seem like this would work for any script. Is this the case? I just don't want people getting confused when they run it. user added image

no your missing the point. i tried Melanie. and i found it very unfriendly (my personal experience) also its missing layouts, and controls. Also its NOT inside maya. mine will be. you will see your window as you make it. it will update as your add things and directly debug it for you. And so on.

as for the hex codes. you are missing part of the decoding. those x's that you see are actualy MEL and Python special characters, like /n, //, /", ... in needed to change them for making all the strings compatible when handling them inside MEL and/or Python. So avoiding errors when reading MEL files for conversion.

after you decoded the hex string you also need to replace those special characters again to their original state for rebuilding the original MEL file.

for example the line that you took will look like this correctly decoded.

source "Test Script 001.mel";
this is a line from a button on the shelf.

your result should look like this
xÉxsource xÌxxÉxTest Script 001.melxÌxxÉx;xÌxnxÉx xÈx

so I don't know where you got all the \ could be a version conflict. but thats why i'm asking to test it user added image

i use the "x something x" key for myself to keep the code from confusing the special character with a original character


Another point is you only got the decoder part to remake the files. the actual Encoder is at this point not yet released as i dont want it to be used before i know its 100% error free. The data i created works fine on my system and Maya 2012. the question is does it works on other systems and maya versions.

as for you last question. the complete decoder for creating the data strings will be ussable for all scripts that are made up off different scripts. right now its just a test phase.

Jouri.


There are no stupid questions, only stupid answers.


© All grammar errors are Copyrighted to me

Last edited by Jouri; 06-12-2011 at 03:08 PM.