View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002886 | FSSCP | lab | public | 2013-06-03 21:37 | 2014-07-09 21:24 |
| Reporter | FUBAR-BDHR | Assigned To | FUBAR-BDHR | ||
| Priority | low | Severity | feature | Reproducibility | N/A |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.19 | ||||
| Target Version | 3.7.2 | Fixed in Version | 3.7.2 | ||
| Summary | 0002886: Patch to enable external weapon model rendering in the tech lab | ||||
| Description | Useful 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. | ||||
| Tags | No tags attached. | ||||
|
|
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
|
|
|
Link to thread: http://www.hard-light.net/forums/index.php?topic=83259.msg1662869#msg1662869 |
|
|
Fix committed to trunk@10907. |
|
|
Committed with a change to the string length check to be like the one above it. |
| 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 |