Skip to content

Commit

Permalink
Version 2
Browse files Browse the repository at this point in the history
- When using the "Pack before merge" option on inputs, the plugin now uses the origin for the pivot location instead of the centroid.
  • Loading branch information
dpernuit committed Feb 11, 2022
1 parent c0f122e commit 6f1c0ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/HoudiniEngine/Private/HoudiniInputTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ FHoudiniInputTranslator::UpdatePackBeforeMerge(UHoudiniInput* InInput)

bool bSuccess = true;
const std::string sPack = "pack";
const std::string sPivot = "pivot";

// We'll be going through each input object plugged in the input's merge node
// and change the pack parameter there
Expand All @@ -970,6 +971,12 @@ FHoudiniInputTranslator::UpdatePackBeforeMerge(UHoudiniInput* InInput)
FHoudiniEngine::Get().GetSession(), InputObjectNodeId,
sPack.c_str(), 0, nPackValue))
bSuccess = false;

// Change the pivot parameter on the object merge to "origin"
if (HAPI_RESULT_SUCCESS != FHoudiniApi::SetParmIntValue(
FHoudiniEngine::Get().GetSession(), InputObjectNodeId,
sPivot.c_str(), 0, 0))
bSuccess = false;
}
}

Expand Down

0 comments on commit 6f1c0ba

Please sign in to comment.