Author Topic: Blender: property acronyms  (Read 752 times)

Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
Blender: property acronyms
« on: November 13, 2006, 08:31:20 AM »
Hi Blender user's

I'm planning to add a new 'properties acronym' optional function to the next script version.

The idea behind this function is to cutdown the error prone properties typing process. Instead of the 'StencilAlpha=1' or 'DoNotSmallCull=0' typing, you just need to write 'S1' or 'SC' and the script will translate it during the export process.

I guess the Hitech is ripping his hairs off:
'I r coading a literal properties and this guy is making da cryptic code?! Ok, next OE version will have only hexa codes!. Harrr Harrr!'

j/k



The CASE SENSITIVE acronyms
The CAPITAL letter means the property in ON. The low case letter means, the property is OFF.

The OFF properties are default, and so on the user don't NEED to specify them separetly. IMHO

The acronym dictionary:
'C'   :   'NoCollide=0',
'c'   :   'NoCollide=1',
'D'   :   'Dead=1',
'd'   :   'Dead=0',
'H'   :   'Hidden=1',
'h'   :   'Hidden=0',
'SC'  :   'DoNotSmallCull=0',
'sc'  :   'DoNotSmallCull=1',
'T'   :   'Terrain=1',
't'   :   'Terrain=0',
'm'   :   'MinDist=',
'M'   :   'MaxDist=',
'P'   :   'PolyID=',
'S'   :   'StencilAlpha=',
'Z'   :   'ZBias='

I invert in purpose the 'NoCollide=0/1' and 'DoNotSmallCull=0/1' acronyms, because this way the acronym list logic is lined.

The script will automatically read the min/maxdist=, polyid=, stencilalpha= and zbias= values after header letter I.E. 'm2000' = 'MinDist=2000'. The values must be integer values.

----

Well, this is how I planned it so far. The basic functions are running fine in Python IDLE environment.

Any comments, wishes and/or critic?

(edit typos)
« Last Edit: November 13, 2006, 08:41:36 AM by Xjazz »

Offline BlauK

  • Platinum Member
  • ******
  • Posts: 5091
      • http://www.virtualpilots.fi/LLv34/
Blender: property acronyms
« Reply #1 on: November 13, 2006, 08:48:10 AM »
XJazz,
AFAIK the properties are off by default if there is no tag. You dont have to tell e.g. Terrain=0... it is meaningless ;)
Also he NoCollide=0 does not seem to make e.g. the Dead shapes collidable and the PolyID and Hidden tags still do not converted into OE.


  BlauKreuz - Lentolaivue 34      


Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
Blender: property acronyms
« Reply #2 on: November 13, 2006, 08:59:25 AM »
Hi Blauk,

I wasn't sure about that 'default off' issue so, I just included all properties from AC3D.txt file to the dictionary.

The story behind this idea is that, ónce I was spending some time with object debugging... Caused by one small typo in properties  :mad:

Offline Kermit de frog

  • Gold Member
  • *****
  • Posts: 3694
      • LGM Films
Blender: property acronyms
« Reply #3 on: November 15, 2006, 11:59:58 AM »
How and where do I put code like nocollide=0, min=10,max=1000 and other stuff like that.

I know how to group and make correct hierarchies.  I just don't know how or where to put other code as well as what does and doesn't need to be inculded.  I'm using AC3D btw.
Time's fun when you're having flies.

Offline BlauK

  • Platinum Member
  • ******
  • Posts: 5091
      • http://www.virtualpilots.fi/LLv34/
Blender: property acronyms
« Reply #4 on: November 15, 2006, 12:53:16 PM »
You right-click the object or group in the hierarchy tree (F8) and select "properties"

btw... the tags must have correct names..... NoCollide, MinDist, MaxDist, etc.


  BlauKreuz - Lentolaivue 34      


Offline Kermit de frog

  • Gold Member
  • *****
  • Posts: 3694
      • LGM Films
Blender: property acronyms
« Reply #5 on: November 16, 2006, 01:37:30 AM »
Do I put each code on it's own line or separte them with commas?

Screen shot of it would be nice. :)
Time's fun when you're having flies.

Offline BlauK

  • Platinum Member
  • ******
  • Posts: 5091
      • http://www.virtualpilots.fi/LLv34/
Blender: property acronyms
« Reply #6 on: November 16, 2006, 01:44:25 AM »
On their own lines.

You can learn a lot by exporting one of the HTC default objects (some simple one at first) from OE to ac3d, and by looking how their hierarchy is built and what tags are used.
Select the desired object in OE's list and click the export button to get its *.ac file and *bmp:s into your export folder.

ps. Kermit,
continue this in a new thread if necessary, ok? We are hijacking teh original topic here ;)
Sorry XJazz...
« Last Edit: November 16, 2006, 01:47:10 AM by BlauK »


  BlauKreuz - Lentolaivue 34      


Offline Xjazz

  • Gold Member
  • *****
  • Posts: 2653
Blender: property acronyms
« Reply #7 on: November 16, 2006, 08:07:29 AM »
No problem Bk :)

---

I’m still looking the final form for this sidekick function.
New idea is a user specified acronyms.

Example:

-(Beginning of the acronym dictionary text object/file)-
# Generic acronyms
C : NoCollide=0
D : Dead=1
H : Hidden=1
M : MaxDist=
P : PolyID=
S : StencilAlpha=
SC : DoNotSmallCull=0
T : Terrain=1
Z : ZBias=
# For the ‘MinDist=’ you write ‘M [MinDist value]-[MaxDist value]'
# I.E. 'M2000-10000' means MinDist=2000 MaxDist=10000.
#
# User specified acronyms. Must start with ‘<’ mark
# These are just example ones. Do as many you want.
-(End of the acronym dictionary text object/file)-

This works in IDLE already.