Make Bake to Prefab variation without having to rename files

   1631   1   1
User Avatar
Member
20 posts
Joined: Feb. 2017
Offline
Hi Houdies.

When creating variation of the same HDA (called SMO_Test.hda), i usually Drag-n-drop it in the scene, do paramaters changes, then i rename it to Tree_type_A.
But once i bake it to Prefab, it doesn't use that name as Prefab name and Mesh name.

i end up with this:
Assets/HoudiniEngineAssetCache/Baked/SMO_Test1/SMO_Test1.prefab
Assets/HoudiniEngineAssetCache/Baked/SMO_Test1/Meshes/SMO_Test_meshes.asset


i would prefer to have:
Assets/HoudiniEngineAssetCache/Baked/Tree_type_A/Tree_type_A.prefab
Assets/HoudiniEngineAssetCache/Baked/Tree_type_A/Meshes/Tree_type_A_meshes.asset

Is there a way to define set those using the Name in scene instead as a common behavior ?
Because at this time if you make a change on parameters on this HDA to make a variation , then rename it in the scene, and Bake To Prefab, it will overwrite the data you previously created by this.
User Avatar
Member
5 posts
Joined: March 2016
Offline
Sorry to revive this thread

I am having the same issue as Smoluck, and I'd love some way to control the output prefab and mesh name, or at the very least a add prefix to it. Especially because it's quite vulnerable to mistakes when renaming asset manually, not to mention the painful workflow it creates.

I'd prefer not edit the unity plugin itself, as I am not entirely clear how the name is being used in the code, but if that is what it takes . From what I can tell, the name of the prefab is taken from the _assetName property, and the mesh .asset name is taken from the _assetOpName property, but if I edit these, the plugin complains about the names not matching the actual asset, not to mention that these are private properties.

What is the best entry point for overriding the output names in the unity plugin? Alternatively, could we get a simple string field on the HEU_HoudiniAssetRoot object, or even just some way to set it with the HDA itself, similar to the "instance_prefix" or the "unity script" attribute?

Any tips or pointers would be much appreciated!
  • Quick Links