Author Topic: AC3D users: a hierarchy tree structure & properties managing script (1.0 beta)  (Read 1135 times)

Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
Hi

I write an experimental python script for the AC3D users. The target is easier hierarchy tree and properties managing.
http://warezhouze.1g.fi/Here/AC3D/HTP4ac1b0.zip

zip  file contains these four files


Requirement
You must have a python installed to your computer to run this script:
http://www.python.org/download/releases/2.4.4/

Function
The script combine the text file data with source .ac file geometry and texture data to the 'combined.ac' file .

Usage
The source .ac, .txt files and 'combined.ac' template file with HTP4ac1b0.py file must place to same folder.

The .txt text file format is same with my Blender export script. Check the “The ‘htp.txt’ format” part:
http://www.hitechcreations.com/forums/showthread.php?s=&postid=2210057#post2210057

The ready text file must have same name with .ac file.

Once files are ready, double click the HTP4ac1b0.py file and dialog opens


Type in the .ac file name with 's, like picture below


Remember, the script will over write the combined.ac file everytime so, save the result.

Let me know if there are any problems.

Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
AC3D users: a hierarchy tree structure & properties managing script (1.0 beta)
« Reply #1 on: November 23, 2006, 08:56:08 AM »
New version is available

Fixed in final 1.0 version:
- The .ac file name input doesn't need a ' marks any more.
- Added optional output .ac file naming dialog.
- The top 'world' group doesn't need anymore space after the comma.
- The 'loc' data is parsed, if it exists with .ac file object.
- Added the end note with output file name.
- Added error managing routines for the empty .ac name input, missing .txt file and missing object cases.
- Added some code comments

File naming
The .ac and .txt files must have a same name. The script will ask a name for the output file. If not given, the script will automatically give a 'C_(.ac file name).ac'


Group and Object naming
All group and object names must be individual. The object names are case sensitive between .ac and .txt files.

The script will combine only those objects, which are mentioned in .txt file. You can have an assist scene / landscape objects included to the .ac file.  


Script testing
I don't have AC3D license so, I don't have that much interest to do a testing with complex .ac objects. The AC3D users can do that job, if interested about the script :)


'Code alla Spaghetti'
If the code is looking funny for you, I can tell the reason for it. I took my very first programming steps last April and since that I have been coding very occasional.

Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
AC3D users: a hierarchy tree structure & properties managing script (1.0 beta)
« Reply #2 on: November 23, 2006, 01:00:29 PM »
Uh, I forget I can't edit the message after the 120min.
 
Link to the new version
http://warezhouze.1g.fi//public_html/Here/AC3D/HTP4ac1v0.zip

Offline soda72

  • Platinum Member
  • ******
  • Posts: 5201
AC3D users: a hierarchy tree structure & properties managing script (1.0 beta)
« Reply #3 on: November 24, 2006, 06:46:22 AM »
If you're looking for programming projects that are fun and in python you might want to check out a game called "Freedom Force" and "Freedom Force vs Third Reich".  The Game provides a lot of support for people who like to do mods and the game script engine is done in python.

Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
AC3D users: a hierarchy tree structure & properties managing script (1.0 beta)
« Reply #4 on: November 24, 2006, 03:30:48 PM »
Soda,
I'm not that much in to the programming. I started it, because the Blender's original AC3D export script didn't meet at all AH OE needs.

---------------

Version 1.1
http://warezhouze.1g.fi/Here/AC3D/HTP4ac1v1.zip

This latest version is tested much further with more complex object than two previous versions.

Fixed in 1.1:
- top group world writen correctly.
- hierarchy tree without properties won't cause problems anymore.
- texture file name is now parsed if it exists with given object in .ac file.
- dialog window shows how the script sees your .txt file content: Name, properties & kids.
- #-mark started comment lines in middle of the hierarchy tree are supported.

The HTP4acv1v1.zip file contains the new script plus fub2t.ac & fub2t.txt example files and two original textures. The fub2t.ac is actually stripped fub2.ac (fuel truck) object from OE.
I removed all hierarchy tree, properties and loc data from fub2t.ac.

Give a try and let me know if you like it or not.

Thanks

Offline Denholm

  • Plutonium Member
  • *******
  • Posts: 9667
      • No. 603 Squadron
AC3D users: a hierarchy tree structure & properties managing script (1.0 beta)
« Reply #5 on: November 27, 2006, 09:35:42 AM »
Quote
Originally posted by soda72
If you're looking for programming projects that are fun and in python you might want to check out a game called "Freedom Force" and "Freedom Force vs Third Reich".  The Game provides a lot of support for people who like to do mods and the game script engine is done in python.

He's very useful around here, don't want him fleeing the area, I still don't know everything about 3-D design.:aok
Get your Daily Dose of Flame!
FlameThink.com
No. 603 Squadron... Visit us on the web, if you dare.

Drug addicts are always disappointed after eating Pot Pies.

Offline Ex-jazz

  • Nickel Member
  • ***
  • Posts: 482
Re: AC3D users: a hierarchy tree structure & properties manager 2.0 with GUI
« Reply #6 on: December 13, 2009, 04:37:21 PM »
Hi

I made a new HTP4ac version.

This has a very simple GUI and don't require a python installation.


What is does?

The application allows the user to combine the text file hierarchy three & properties data with the AC3D (.ac) file geometry & texturing data.

The download included .ac file hierarchy without properties:
http://fdm4bge.1g.fi/Files/10001/AH/python/htp4ac/HTP4ac2v0/pics/a_original.png

The intent hierarchy three & properties in txt file:

http://fdm4bge.1g.fi/Files/10001/AH/python/htp4ac/HTP4ac2v0/pics/a_htp_data.png

The result after the application run:
http://fdm4bge.1g.fi/Files/10001/AH/python/htp4ac/HTP4ac2v0/pics/a_combined.png

The user can create the hierarchy three are properties with notepad or any similar text editor.

The 4.4M zipped download file
http://fdm4bge.1g.fi/Files/10001/AH/python/htp4ac/HTP4ac2v0/HTP4ac2v0.zip

Run the HTP4ac2v0.exe, select from the  'Sample_ac'  folder a  'fub2t.ac' file and click ok. The application will combine a C_fub2t.ac named file with hierarchy three & properties.

The HTP4ac2v0.exe is compiled with the py2exe:
http://www.py2exe.org/

The HTP4ac2v0 source file is included in  'HTP4ac_source' folder .

« Last Edit: December 13, 2009, 04:39:14 PM by Ex-jazz »

Offline Ex-jazz

  • Nickel Member
  • ***
  • Posts: 482
Hi

The material definitions are changed in new OE.

Now the user can update the 'AHmaterials.txt' file content at will.

HTP4a2v1  -  19.12.2009
- The AH2-OE material definitions are now readed from the 'AHmaterials.txt' file in root.
- The missing 'AHmaterials.txt' file error message added.
- The 'Credits' text added.
- Added the missing 'TRUCKD_a.txt' alpha channel file for the TRUCKD.bmp texture to the sample folder.

HTP4a2v1 download
http://fdm4bge.1g.fi/Files/10001/AH/python/htp4ac/HTP4ac2v1/HTP4ac2v1.zip

Your feedback is highly appreciated