Jump to content

Skeleton File Generator


Recommended Posts

On 25.05.2017 at 0:10 PM, stanislas69 said:

I created this little python script to autogenerate skeleton files from dae files, which will hopefully be a timesaver for artists. https://github.com/StanleySweet/0AD-Skeleton-Generator

Cool! You could add a simple parsing of sys.argv to avoid a script editing:

if len(sys.argv) > 1:
	FILE_NAME  = sys.argv[1]

Or something like this.

Edited by vladislavbelov
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

@stanislas69 First of all, let me thank you for making this tool.
Here you mentioned that you can make the script to work with a folder:

Maybe these suggestions are similar to what you have in mind.

A rough explanation of this concept.

The main folder contains two empty folders ("input" and "output"), the script itself, a readme file, and a license file.
When the script starts it looks inside the "input" folder for .dae files. If there are no .dae files found it shows something like "No .dae files found inside the input folder". Else for every .dae file inside the "input" folder it creates an .xml file with the same name inside the "output" folder.

Main folder structure:

1500811116-concept.png

Here is an example:

1. An artist puts .dae files inside the "input" folder.
2. Starts the script.
3. Waits until the script stops.
4. Takes .xml skeleton files from the "output" folder.

Possible advantages for an artist.

Somehow intuitive (well, for me at least).
It works with any number of files.
An artist only have to run the script. No need to manually edit path to files. All input files are located in the "input" folder. And that folder is located in the same folder as the script itself.
Generated files are located in a different folder. It should help when there are many files.

Disadvantages.

Modifying the current script. I do not know how hard it will be to implement these changes.
It is just my point of view. So it needs other artists' feedback about how intuitive and easy to use this concept can be.

What do you think, stanislas69?

Edited by Strannik
Fixed several mistakes
Link to comment
Share on other sites

58 minutes ago, Strannik said:

@stanislas69 First of all, let me thank you for making this tool.
Here you mentioned that you can make the script to work with a folder:

Maybe these suggestions are similar to what you have in mind.

A rough explanation of this concept.

The main folder contains two empty folders ("input" and "output"), the script itself, a readme file, and a license file.
When the script starts it looks inside the "input" folder for .dae files. If there are no .dae files found it shows something like "No .dae files found inside the input folder". Else for every .dae file inside the "input" folder it creates an .xml file with the same name inside the "output" folder.

Main folder structure:

1500811116-concept.png

Here is an example:

1. An artist puts .dae files inside the "input" folder.
2. Starts the script.
3. Waits until the script stops.
4. Takes .xml skeleton files from the "output" folder.

Possible advantages for an artist.

Somehow intuitive (well, for me at least).
It works with any number of files.
An artist only have to run the script. No need to manually edit path to files. All input files are located in the "input" folder. And that folder is located in the same folder as the script itself.
Generated files are located in a different folder. It should help when there are many files.

Disadvantages.

Modifying the current script. I do not know how hard it will be to implement these changes.
It is just my point of view. So it needs other artists' feedback about how intuitive and easy to use this concept can be.

What do you think, stanislas69?

Here is the deal :)

I'm going to do it no matter what, in the meantime you'll start animating some of micket models of your choosing :)

So it's a win win :P

  • Like 2
Link to comment
Share on other sites

Since I haven't seen any checks in that the input and output folders exist (and create them if they don't), I guess you should add those folders to the repository itself. Since git doesn't handle folders, but just files you'll have to do something like add an empty .gitignore file or similar to those folders and commit them.

  • Like 2
Link to comment
Share on other sites

6 hours ago, stanislas69 said:

Here is the deal :)

I'm going to do it no matter what, in the meantime you'll start animating some of micket models of your choosing :)

So it's a win win :P

Ha-ha. A deal? Well, the cobra is a model made by Micket. So, technically, I kept my side of the bargain :P.

Seriously though, I can hardly find time to make animations for one model. Working on two models at the same time is not really an option for me.

5 hours ago, stanislas69 said:

It's done :) You can check out the script on the github repository :)

Thanks for the update. I hope others will find changes useful.

I have made several quick test on WIN10 with Python 3.5. It appears to work well. Putting chicken.dae and mastiff.dae resulted in only one file Armature.xml. But there is a warning about that in Readme. Maybe this can be avoided by using the name of the input file for the output file. But I can try to add something like that myself. I cannot afford another deal :P.

Thanks again.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...