Home Marmoset

estimateOffset() causes chrash Toolbag 3.08

puksna
polycounter lvl 5
Offline / Send Message
puksna polycounter lvl 5
  1. import mset
  2. <div><br></div><div>lp = mset.importModel("C:/Work/lp.obj")
  3. </div><div>hp = mset.importModel("C:/Work/hp.obj")
  4.  
  5. </div><div><br></div><div>baker = mset.BakerObject()
  6.  
  7. </div><div>bakerGroup = baker.addGroup("Group_1")
  8.  
  9. </div><div>hpGroup = bakerGroup.findInChildren("High")
  10.  
  11. </div><div>lpGroup = bakerGroup.findInChildren("Low")</div><div>
  12. <br></div><div>baker.outputPath = "C:/Work/MyBake.psd"
  13. </div><div>baker.outputBits = 8
  14. </div><div>baker.outputSamples = 16
  15. </div><div>baker.edgePadding = "Custom"
  16. </div><div>baker.edgePaddingSize = 16
  17. </div><div>baker.outputSoften = 0
  18. </div><div>baker.useHiddenMeshes = True
  19. </div><div>baker.ignoreTransforms = True
  20. </div><div>baker.smoothCage = True
  21. </div><div>baker.ignoreBackfaces = True
  22. </div><div>baker.multipleTextureSets = False
  23.  
  24. </div><div><br></div><div># These settings only apply if texture sets aren't enabled:
  25. </div><div>baker.outputWidth = 512
  26. </div><div>baker.outputHeight = 512
  27.  
  28. </div><div><br></div><div># If Texture Sets are enabled, then you can set them up as follows:
  29. </div><div>#baker.setTextureSetWidth("My Texture Set Name", 256)
  30. </div><div># Or...
  31. </div><div>#baker.setTextureSetWidth(0, 256)
  32. </div><div>#baker.loadPreset("All")
  33.  
  34. </div><div>normalMap = baker.getMap("Normals")
  35. </div><div>normalMap.enabled = True
  36. </div><div>normalMap.resetSuffix()
  37. </div><div>normalMap.suffix = "norms"
  38. </div><div>normalMap.flipX = True
  39.  
  40. </div><div>baker.savePreset("My Python Preset")
  41.  
  42. </div><div>hp.parent = hpGroup
  43. </div><div>lp.parent = lpGroup
  44.  
  45. </div><div>lpGroup.minOffset = 0
  46. </div><div>lpGroup.maxOffset = 0.031
  47.  
  48. </div><div>lpGroup.estimateOffset() #crash
  49.  
  50. </div><div>#baker.bake()
  51.  
  52. </div><div></div>
Works fine from console, but script keeps crashing marmoset.
HP and LP are simple cubes.

Thanks

Replies

  • EarthQuake
    Thank you for the bug report. We were able to reproduce and fix this. The fix will go out in a future version.

    Unfortunately we don't have any specific advice for how to avoid this for now.
  • puksna
    Offline / Send Message
    puksna polycounter lvl 5
    Thank you. Do you think it would be possible (and makes sense) to expose offset and skew images to API so they can be loaded from external app? I am working on blender-marmoset batch baker addon, so i would like to use toolbag with hide parameter. My goal is for user to never touch toolbag if possible. Thanks once again.
  • EarthQuake
    Yes that may be possible at some point in the future. We've had some user requests for saving/loading the images, so if we add that we'll likely add Python hooks for it too. Thanks for the feedback.
Sign In or Register to comment.