[REQ] Include directive

Feature requests, bug reports and related discussion
Post Reply
7 posts • Page 1 of 1
Deus
Posts: 336
Joined: Sun Feb 04, 2007 3:47 am

[REQ] Include directive

Post by Deus » Sat Feb 10, 2007 6:02 am

I want

<include>myfile.xml</include>

It should work as if the file was pasted into the location of the include directive

I did this myself in a couple of xml languages/projects. You need some kind of stack of old xml contexts and just make a new context with the new file.

Its perfect for many things. Got a standard camera angle? Just make a file and include it. Wanna make all those SWEET default primitives once and for all? Just include the mesh

Code: Select all

       <include>coolmesh.xml</include>

	<model>
		<pos>0 0 0</pos>
		<scale>1.0</scale>
		<mesh_name>coolmesh</mesh_name>>
	</model>
For materials the benefit is obvious

This would be even more powerful with a concept of "current setting" or a stackbased context that would allow constructions like this

Code: Select all

       <include>mysweetmaterial.xml</include>
       <material>mysweetmaterial</material>
       <include>coolmesh.xml</include>

	<model>
		<pos>0 0 0</pos>
		<scale>1.0</scale>
		<mesh_name>coolmesh</mesh_name>>
	</model>
Whatcha think?

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Post by manitwo » Sat Feb 10, 2007 6:08 am

i think this would be really great.
particularly with regard to arneoog's upcoming material database.

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sat Feb 10, 2007 6:21 am

That is possibe now, pretty much.. :)
Don't remember the code.. and I can't find a file where I used it.. :?

ryjo
Posts: 68
Joined: Tue Jul 04, 2006 6:16 am
Location: Pluton

Post by ryjo » Sat Feb 10, 2007 6:59 am

This works since a while back:
<include>
<pathname>my-mesh.xml</pathname>
</include>
<include>
<pathname>my-materials.xml</pathname>
</include>
.. etc ...
/ryjo

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Feb 10, 2007 7:00 am

Code: Select all

<include> 
	<pathname>yourexternalfile.xml</pathname> 
</include> 

Your external file will have to be in the form of 

<scenedata> 
... 
.. 
... 
</scenedata>
reported by u3dreal

Deus
Posts: 336
Joined: Sun Feb 04, 2007 3:47 am

Post by Deus » Sat Feb 10, 2007 7:41 am

Thats cool! Thx :)

Question. Why is Onos XML always so talky?

<include file="bla bla"/> would work.. Many many tags there

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Feb 10, 2007 2:15 pm

Hehe... I agree with you Deus, I'm refraining myself to post a request for short names for quite some days now, like <scs> instead of <scattering_coefficient_spectrum>. Would be great if Indigo could parse both of them (Maya can use 3 differents levels of concatenation for attributes, short names (ty), long names (translatey) and nice names (Translate Y), amongst them the 2 formers can be used in the same script).

Post Reply
7 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests