Home Marmoset

estimateOffset() causes chrash Toolbag 3.08

puksna
polycounter lvl 5
Offline / Send Message
puksna polycounter lvl 5
import mset
<div><br></div><div>lp = mset.importModel("C:/Work/lp.obj")
</div><div>hp = mset.importModel("C:/Work/hp.obj")

</div><div><br></div><div>baker = mset.BakerObject()

</div><div>bakerGroup = baker.addGroup("Group_1")

</div><div>hpGroup = bakerGroup.findInChildren("High")

</div><div>lpGroup = bakerGroup.findInChildren("Low")</div><div>
<br></div><div>baker.outputPath = "C:/Work/MyBake.psd"
</div><div>baker.outputBits = 8
</div><div>baker.outputSamples = 16
</div><div>baker.edgePadding = "Custom"
</div><div>baker.edgePaddingSize = 16
</div><div>baker.outputSoften = 0
</div><div>baker.useHiddenMeshes = True
</div><div>baker.ignoreTransforms = True
</div><div>baker.smoothCage = True
</div><div>baker.ignoreBackfaces = True
</div><div>baker.multipleTextureSets = False

</div><div><br></div><div># These settings only apply if texture sets aren't enabled:
</div><div>baker.outputWidth = 512
</div><div>baker.outputHeight = 512

</div><div><br></div><div># If Texture Sets are enabled, then you can set them up as follows:
</div><div>#baker.setTextureSetWidth("My Texture Set Name", 256)
</div><div># Or...
</div><div>#baker.setTextureSetWidth(0, 256)
</div><div>#baker.loadPreset("All")

</div><div>normalMap = baker.getMap("Normals")
</div><div>normalMap.enabled = True
</div><div>normalMap.resetSuffix()
</div><div>normalMap.suffix = "norms"
</div><div>normalMap.flipX = True

</div><div>baker.savePreset("My Python Preset")

</div><div>hp.parent = hpGroup
</div><div>lp.parent = lpGroup

</div><div>lpGroup.minOffset = 0
</div><div>lpGroup.maxOffset = 0.031

</div><div>lpGroup.estimateOffset() #crash

</div><div>#baker.bake()

</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.