View Issue Details

IDProjectCategoryView StatusLast Update
0005996DarkRadiantModelspublic14.01.2024 13:39
Reportergreebo Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.0.0 
Target Version3.9.0Fixed in Version3.9.0 
Summary0005996: Skins defined on modelDefs are ignored
DescriptionDarkRadiant doesn't consider skins set on modelDefs. It can deal with skin spawnargs or skin keyvalues set in the entityDef, but the one in the modelDef (see idDeclModel::GetDefaultSkin()) is ignored.
TagsNo tags attached.
Attached Files
2022-07-03 08_16_28-Clipboard.jpg (193,225 bytes)   
2022-07-03 08_16_28-Clipboard.jpg (193,225 bytes)   
2022-07-03 08_17_02-Camera.jpg (180,682 bytes)   
2022-07-03 08_17_02-Camera.jpg (180,682 bytes)   

Activities

greebo

greebo

03.07.2022 06:22

administrator   ~0014964

Attached the test .def file. It could use more variations using modelDefs that are inheriting the skin setting.
skinned_models.def (834 bytes)   
model some_base_modeldef
{
	mesh		models/md5/chars/guards/proguard/tdm_ai_proguard_use.md5mesh
}

model some_modeldef
{
	mesh		models/md5/chars/guards/proguard/tdm_ai_proguard_lowest.md5mesh
}

model some_modeldef_with_skin
{
	mesh		models/md5/chars/guards/proguard/tdm_ai_proguard_lowest.md5mesh
	skin		proguard/redbrown_coat
}

entityDef entity_using_modeldef
{
	"inherit"				"atdm:ai_humanoid"

	"editor_color"			"0 1 0"
	"editor_mins"			"-32 -32 -32"
	"editor_maxs"			"32 32 32"

	"spawnclass"			"idAI"
	"model"					"some_base_modeldef"
}

entityDef entity_using_modeldef_with_skin_keyvalue
{
	"inherit"	"entity_using_modeldef"
	"skin"		"guard/leather_tunic01_nochain"
}

entityDef entity_using_skinned_modeldef
{
	"inherit"	"entity_using_modeldef"
	"model"		"some_modeldef_with_skin"
}


skinned_models.def (834 bytes)   

Related Changesets

DarkRadiant: master 0fcbe674

14.01.2024 05:58

greebo


Details Diff
0005996: Start adding tests to cover modelDefs setting/inheriting/overriding skins Affected Issues
0005996
mod - test/Skin.cpp Diff File
add - test/resources/tdm/def/skinned_models.def Diff File

DarkRadiant: master b9d6d6ac

14.01.2024 06:24

greebo


Details Diff
0005996: Add more tests checking the resulting skinned model an entity using a modelDef as "model" key value Affected Issues
0005996
mod - test/Skin.cpp Diff File
mod - test/resources/tdm/def/skinned_models.def Diff File
add - test/resources/tdm/models/md5/testflag.md5mesh Diff File

DarkRadiant: master e7056c9f

14.01.2024 07:39

greebo


Details Diff
0005996: Extend test cases, add lots of combinations of entityDef and modelDef/skins/overrides. Affected Issues
0005996
mod - test/Skin.cpp Diff File
mod - test/resources/tdm/def/skinned_models.def Diff File

DarkRadiant: master b2b2889d

14.01.2024 08:25

greebo


Details Diff
0005996: First implementation attempt. Store the default skin on the SkinnedModel instance, it will be used if the explicitly set skin is empty Affected Issues
0005996
mod - include/modelskin.h Diff File
mod - plugins/script/interfaces/ModelInterface.cpp Diff File
mod - radiantcore/entity/ModelKey.cpp Diff File
mod - radiantcore/model/StaticModelNode.cpp Diff File
mod - radiantcore/model/StaticModelNode.h Diff File
mod - radiantcore/model/md5/MD5ModelNode.cpp Diff File
mod - radiantcore/model/md5/MD5ModelNode.h Diff File
mod - test/Skin.cpp Diff File

DarkRadiant: master 68e37d55

14.01.2024 08:34

greebo


Details Diff
0005996: Ensure the model is updating its remaps once a default skin has been set Affected Issues
0005996
mod - radiantcore/entity/ModelKey.cpp Diff File

DarkRadiant: master bf4ec382

14.01.2024 08:49

greebo


Details Diff
0005996: Another test checking that a model swap is not carrying over the default skin of the previous model (fails right now) Affected Issues
0005996
mod - test/Skin.cpp Diff File

DarkRadiant: master 32935c8c

14.01.2024 09:11

greebo


Details Diff
0005996: Change the way the ModelKey is preserving the skin when switching models.

The most recent explicit skin value is remembered and set on the new model node.
If there's no explicit skin set, the default one on the model node will be in effect.
Affected Issues
0005996
mod - radiantcore/entity/ModelKey.cpp Diff File
mod - radiantcore/entity/ModelKey.h Diff File
mod - test/Skin.cpp Diff File

DarkRadiant: master af90997b

14.01.2024 10:16

greebo


Details Diff
0005996: One more test checking a model change with an explicit skin applied Affected Issues
0005996
mod - test/Skin.cpp Diff File

DarkRadiant: master 300e715a

14.01.2024 10:28

greebo


Details Diff
0005996: Test a model change with an inherited skin property Affected Issues
0005996
mod - test/Skin.cpp Diff File

DarkRadiant: master 8812ae4b

14.01.2024 13:18

greebo


Details Diff
0005996: Test modelDef change triggering skin updates Affected Issues
0005996
mod - test/Skin.cpp Diff File

DarkRadiant: master 1ae7ccfa

14.01.2024 13:37

greebo


Details Diff
0005996: Fix ModelSelector not displaying the skin defined in modelDefs Affected Issues
0005996
mod - libs/wxutil/preview/ModelPreview.cpp Diff File

Issue History

Date Modified Username Field Change
03.07.2022 06:18 greebo New Issue
03.07.2022 06:18 greebo File Added: 2022-07-03 08_16_28-Clipboard.jpg
03.07.2022 06:18 greebo File Added: 2022-07-03 08_17_02-Camera.jpg
03.07.2022 06:18 greebo Status new => confirmed
03.07.2022 06:18 greebo Summary Skin handling in entityDefs/modelDefs => Skins defined on modelDefs are ignored
03.07.2022 06:22 greebo Note Added: 0014964
03.07.2022 06:22 greebo File Added: skinned_models.def
14.01.2024 13:22 greebo Assigned To => greebo
14.01.2024 13:22 greebo Status confirmed => assigned
14.01.2024 13:22 greebo Target Version => 3.9.0
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master 0fcbe674
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master b9d6d6ac
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master e7056c9f
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master b2b2889d
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master 68e37d55
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master bf4ec382
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master 32935c8c
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master af90997b
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master 300e715a
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master 8812ae4b
14.01.2024 13:38 greebo Changeset attached => DarkRadiant master 1ae7ccfa
14.01.2024 13:39 greebo Status assigned => resolved
14.01.2024 13:39 greebo Resolution open => fixed
14.01.2024 13:39 greebo Fixed in Version => 3.9.0