ModelDef inheritance

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

ModelDef inheritance

Post by Major Cooke »

Having an "InheritFrom" or "Inherited" word/flag would be quite helpful in some circumstances where we may have very large model definitions, rather than having to redefine them over and over again.

From this:

Code: Select all

Model "StaticTrail"
{
	Model 0 "Models/BeamOffset8.md3"
	Scale 100.0 100.0 120.0

	DONTCULLBACKFACES
	USEACTORPITCH
	
	Skin 0 "Graphics/BulletTex.png"
	FrameIndex X202 B 0 0
	Skin 0 "Graphics/BulletTexStart.png"
	FrameIndex X202 Z 0 0
}

Model "StaticTrailBig"
{
	Model 0 "Models/BeamOffset8.md3"
	Scale 100.0 100.0 120.0

	DONTCULLBACKFACES
	USEACTORPITCH
	
	Skin 0 "Graphics/BulletTex.png"
	FrameIndex X202 B 0 0
	Skin 0 "Graphics/BulletTexStart.png"
	FrameIndex X202 Z 0 0
}
To this:

Code: Select all

Model "StaticTrail"
{
	Model 0 "Models/BeamOffset8.md3"
	Scale 100.0 100.0 120.0

	DONTCULLBACKFACES
	USEACTORPITCH
	
	Skin 0 "Graphics/BulletTex.png"
	FrameIndex X202 B 0 0
	Skin 0 "Graphics/BulletTexStart.png"
	FrameIndex X202 Z 0 0
}

Model "StaticTrailBig"
{
	InheritFrom "StaticTrail"
}
In a way, this would allow for skins to also be changed for example. Or if colon could be used, that'd work too.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: ModelDef inheritance

Post by Blue Shadow »

Post Reply

Return to “Closed Feature Suggestions [GZDoom]”