Max User-defined properties

ChrisC

12-05-2006 08:01:40

The exporter doesnt seem to export max's user defined property
just treating it as a single string and adding it to OSM as a user tag would be fine

<entity name="Box01" hidden="false" filename="Box01.mesh" CastShadows="yes" ReceiveShadows="yes">
<position x="-14.345" y="0" z="-58.032" />
<rotation x="0" y="0" z="0" w="-1" />
<scale x="1" y="1" z="1" />
<user text="prop1=blah\nprop2=foo\nprop3=bar" />
</entity>

This would be most useful for entity scripts, which I'm adding by hand to the osm after each export at the moment... :cry:

celic

12-05-2006 09:11:05

I'm adding the additional data by hand, and it's not a problem for me :)
I don't think it's a really good idea, cause every user could have its own specific data, which can't be always placed into one tag like <user data>

ChrisC

12-05-2006 09:30:15

at the end of the day the user-defined property is just a text box, whats the big deal about including text into an OSM?
Its up to the individual how this data is parsed, hand hacking the OSM after export is a pain
First you have to identify the correct entity and then remember which particular script you wanted for it.
This is okay for small scenes, but totally impractical for large scenes, it reduces the whole advantage of using oFusion in the first place
I'd rather drop the text into the Max enties user property and the forget about it...

celic

12-05-2006 10:15:26

<user text="prop1=blah\nprop2=foo\nprop3=bar"/>

If you mean the user defined properties to be just a text, then I think it will require to write a specific parser for that. So, every time an entity is loaded you'll have to parse your string, which will slow down a little the scene loading.

ChrisC

12-05-2006 10:25:46

the userdefined property in max *is* text

using the OnEntityCreate callback to parsing a few bits of text will not slow down loading

in addition with my loader nothing is parsed, the text string is stored as it is, as its the script for the entity

even if you were storing a number of properties in text
so what?
how is this going to slow anything down?
parsing a few text properties from a string can be done very quickly.
the entity is only loaded once, you are making problems where none exist...

celic

12-05-2006 11:03:52

I don't want to stop you thinking as you want, I just wanted to explain my point of view. :wink:

In my situation (I work with small/medium scenes) it's a lot easier and better to edit the .osm files and manually add what is needed. I'm using my own tags which are a little more complex than yours. So, that's why I mentioned the fact that the parsing could take some time. Imagine you a text string of 512 or 1024 bytes full of different data which sould be parsed every time an entity is loaded.

So, what I wanted to say is that implementing your suggestion will cover a small amount of requirements. It's a particular feature, if you want :)

Anyway let's see what Lioric say. :)

ChrisC

12-05-2006 11:16:10

I dont understand what you mean "every time its loaded" and entity is only loaded once!

at most you're with going to have two or three custom tags and more likley just a single script (no parsing, I just store it to be run at a later date)

implementing my sugestion would be trivial and I would have thought a powerful feature

It really doesnt take too many entityies befor hand editing an OSM gets right out of hand....

Anyway let's see what Lioric say.
Good god you mean people actually read these forums :O)

Lioric

12-05-2006 17:23:33

User defined properties are supported in the Pro and Developer version

They are exported in the scene as a map of attributes, each user defined property is a pair value with the key string and the data string (that is why the osm callback systems passes a TiXmlElement* argument with each event)

From the User's Guide, "Event Notification and Post Processing System" chapter:


The TiXmlElement contains the object properties and user defined properties of the created element.

Properties can be queried with the TiXmlElement::Attribute method or via iteration with the TiXmlElement::FirstAttribute and TiXmlElement::Next methods


As this feature is very requested by users of CE, i will take a look to enable this in the next updates

ChrisC

12-05-2006 17:28:46

I for one would *greatly* appreciate that support, thanks for considering it!

Hell656

17-05-2006 20:30:02

Hand editing would be fine but you must edit the scene file everytime you edit it in Max.
P.S. I would appreciate that feature too.

Evak

17-05-2006 20:53:07

we used user defined properties for really simple scripts like:

type = destructibleobject
intactvisuals = kGen
iscollisiondestructible = 1
hitpoints = kEasyToDestroy
minimumdamage = kEasyToDamage


which was used for simple destructible objects in one of the games I worked on a while back, which used max as the level editor. Had tons of destructible objects that were instanced around the level with these simple general purpose scripting option.

I'd find this kind of functionality really handy

blackhound70

20-07-2006 20:25:49

Same here!! We need that feature!

=) BTW... I keep earing about a pro and developper version... WHERE IS IT??? I see no mention of that on the website. I would like all the info on those version.

Thanks

Eric

Lioric

23-07-2006 02:43:51

Provide an email where i can send you the information about the Pro version

IFASS

23-07-2006 11:57:30

Provide an email where i can send you the information about the Pro version

could you send me the info aswell?
to: wilbert ATHERE vdridder DOTT net

Vectrex

23-07-2006 13:39:54

Provide an email where i can send you the information about the Pro version

could you send me the info aswell?
to: wilbert AT vdridder DOT net


I bet any money spam bots can parse that ;) That's why I go octamed at the mail which is hot :twisted:

blackhound70

31-08-2006 04:28:19

Lioric you can contact me at

eric.trudel wendigostudios com

=) I wonder if the spam bot will get this...

replace the first space with at and the second with dot


Thanks

JeDi

29-12-2006 12:30:31

I agree that exporting the user-defined property is almost a must for maintaining large scenes. And putting it in the .osm as a text blob is fine by me, and I guess by most users. The callback mechanism of the .osm loader is perfect for that.
I understand that user properties can be exported by ofusion pro, as a key-value map. Does this use the standard max user-defined properties? Or does it have a property editor gui of its own?

Anyway, I think this is a feature that would be great to have in the CE version, as having to incorporate object types and properties in the object's name is a bit limiting (e.g. dynamic_ball_radius_3_density_2.5_MyBall :-) ).

Great exporter by the way.

Greetz,
JeDi

P.S. I think many users would be glad if you put some info about the PRO version on the website, so users can see the differences between the CE version and evaluate if buying the PRO version has enough benefits for them.

Lioric

30-12-2006 17:45:24

It uses/supports both methods, the max user-defined properties (key/value) and a specific property editor gui