View Issue Details

IDProjectCategoryView StatusLast Update
0002886FSSCPlabpublic2014-07-09 21:24
ReporterFUBAR-BDHR Assigned ToFUBAR-BDHR  
PrioritylowSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version3.6.19 
Target Version3.7.2Fixed in Version3.7.2 
Summary0002886: Patch to enable external weapon model rendering in the tech lab
DescriptionUseful for both checking appearance and creating .bx files for external models. I've been using this for quite awhile. Patch is old but still applies cleanly to current trunk.
TagsNo tags attached.

Activities

FUBAR-BDHR

2013-06-03 21:37

developer  

lab_extern_models.patch (1,016 bytes)   
Index: lab/lab.cpp
===================================================================
--- lab/lab.cpp	(revision 9472)
+++ lab/lab.cpp	(working copy)
@@ -2079,6 +2079,14 @@
 	labviewer_change_model(Weapon_info[weap_index].tech_model, caller->GetSelectedItem()->GetData(), weap_index);
 }
 
+void labviewer_show_external_model(Tree *caller)
+{
+	int weap_index = (int)(caller->GetSelectedItem()->GetParentItem()->GetData());
+	Assert( weap_index >= 0 );
+
+	labviewer_change_model(Weapon_info[weap_index].external_model_name, caller->GetSelectedItem()->GetData(), weap_index);
+}
+
 extern void weapon_load_bitmaps(int weapon_index);
 void labviewer_change_weapon(Tree *caller)
 {
@@ -2177,6 +2185,9 @@
 		if (Weapon_info[i].tech_model[0] != '\0') {
 			cmp->AddItem(cwip, "Tech Model", 0, false, labviewer_show_tech_model);
 		}
+		if ( strlen(Weapon_info[i].external_model_name) ) {
+			cmp->AddItem(cwip, "External Model", 0, false, labviewer_show_external_model);
+		}
 	}
 
 	// Get rid of any empty nodes
lab_extern_models.patch (1,016 bytes)   

FUBAR-BDHR

2013-06-03 21:40

developer   ~0015119

Link to thread: http://www.hard-light.net/forums/index.php?topic=83259.msg1662869#msg1662869

chief1983

2014-07-09 21:22

administrator   ~0016048

Fix committed to trunk@10907.

chief1983

2014-07-09 21:24

administrator   ~0016049

Committed with a change to the string length check to be like the one above it.

Related Changesets

fs2open: trunk r10907

2014-07-09 17:44

chief1983


Ported: N/A

Details Diff
Fix Mantis 2886 - Option to render External weapon models, besides Tech models, in Weapon lab, from FUBAR. Affected Issues
0002886
mod - /trunk/fs2_open/code/lab/lab.cpp Diff File

Issue History

Date Modified Username Field Change
2013-06-03 21:37 FUBAR-BDHR New Issue
2013-06-03 21:37 FUBAR-BDHR Status new => assigned
2013-06-03 21:37 FUBAR-BDHR Assigned To => FUBAR-BDHR
2013-06-03 21:37 FUBAR-BDHR File Added: lab_extern_models.patch
2013-06-03 21:37 FUBAR-BDHR Status assigned => code review
2013-06-03 21:40 FUBAR-BDHR Note Added: 0015119
2014-07-09 21:22 chief1983 Changeset attached => fs2open trunk r10907
2014-07-09 21:22 chief1983 Note Added: 0016048
2014-07-09 21:22 chief1983 Status code review => resolved
2014-07-09 21:22 chief1983 Resolution open => fixed
2014-07-09 21:24 chief1983 Note Added: 0016049
2014-07-09 21:24 chief1983 Fixed in Version => 3.7.2