Skip to content

Instantly share code, notes, and snippets.

@bdancer
Created March 12, 2018 08:10
Show Gist options
  • Save bdancer/5db66397b3f30466dbb9331bbc2ade67 to your computer and use it in GitHub Desktop.
Save bdancer/5db66397b3f30466dbb9331bbc2ade67 to your computer and use it in GitHub Desktop.
diff --git a/src/export/export/vfh_export_geom.cpp b/src/export/export/vfh_export_geom.cpp
index 9e75e524..cb677308 100644
--- a/src/export/export/vfh_export_geom.cpp
+++ b/src/export/export/vfh_export_geom.cpp
@@ -618,8 +618,12 @@ void ObjectExporter::processPrimitives(OBJ_Node &objNode, const GU_Detail &gdp,
}
const STY_Styler &objStyler = getStylerForObject(getStyler(), pluginExporter.getBundleMap(), objNode);
+
PrimitiveItem objItem;
+ objItem.tm = getTm();
+ objItem.vel = getVel();
appendOverrideValues(objStyler, objItem.primMaterial, overrideMerge);
+
pushContext(PrimContext(&objNode, objItem, objStyler));
const GA_ROHandleV3 velocityHndl(gdp.findAttribute(GA_ATTRIB_POINT, GEO_STD_ATTRIB_VELOCITY));
@@ -660,11 +664,9 @@ void ObjectExporter::processPrimitives(OBJ_Node &objNode, const GU_Detail &gdp,
const STY_Styler &primStyler = getStylerForPrimitive(objStyler, *prim);
- PrimitiveItem item;
+ PrimitiveItem item(objItem);
item.prim = prim;
item.primID = getDetailID() ^ primOffset;
- item.tm = getTm();
- item.vel = getVel();
item.objectID = objectIdHndl.isValid() ? objectIdHndl.get(primOffset) : objectID;
if (pathHndl.isValid()) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment