@mikeudin Thx Mike,
Even though I don't speak a word of Russian, I do like your movies
Best posts made by jochemdk
@m_adam
Hi, I did some more testing…
Things only go wrong with a linearCloner’s offset if:
_ any applied baseEffector has the visibility check turned on
_ has a mograph selection/weight tag
_ and if a linearCloner’s offset >= the smallest index of the selection
_ (so random has nothing to do with it
Hi @m_adam, thx for your input, it does reset the WeightManager, but doesn’t do the autoWeighting accordingly..
_First thing I noticed: a difference between int 64 & 32. Not sure if this might be a problem..
Reading the GET> AutoWeight…base.jointcount : <int64> “number of joints”
Reading the SET> AutoWeight…base.jointcount : <int32> “number of joints”
_After the WeightManager is being set (to 1 joint in my case), I can’t click on the “Calculate button” manually.
Nothing happens, unless I change the joint count manually to another number. So something in the update hasn’t been applied..
Note that reading the dict says <int32>, until manually changed, than is says <int64> again..
_I also tried wmgr.SetDirty(doc) / wmgr.Update(doc) / followed by another c4d.EventAdd().. Perhaps these need a different approach as well?
I tried to find something in the “maxon/frameworks” folders you linked to, but couldn’t find any info on how to tackle this issue.
So the current status is still that “default weighting” is applied.
If you can please help in the right direction, it would be greatly appreciated, tia, Jochem
import c4d, maxon
from maxon.frameworks import animation
def main():
doc = c4d.documents.GetActiveDocument()
wmgr = c4d.modules.character.CAWeightMgr
#wmgr.SetDirty(doc)
heatmap_id = wmgr.GetAutoWeightAlgoId(doc, 1) # heatmap
settings = wmgr.GetAutoWeightDictionary(doc, heatmap_id)
settings.Set(maxon.frameworks.animation.AUTOWEIGHTPARAMETERS.JOINTCOUNT, 1)
settings.Set(maxon.frameworks.animation.AUTOWEIGHTPARAMETERS.SELECTEDPOINTS, False)
settings.Set(maxon.frameworks.animation.AUTOWEIGHTPARAMETERS.ALLOWZEROLENGTH, False)
wmgr.SetAutoWeightDictionary(doc, settings, heatmap_id)
#doc.ExecutePasses(None,True,True,True,flags=c4d.BUILDFLAGS_NONE)
c4d.EventAdd()
# getWeightTag - setActive
firstJoint = doc.GetFirstObject().GetDown().GetDown() # just in my testDoc..
weightTag = (firstJoint.GetWeightTag())["op"]
doc.SetActiveTag(weightTag, c4d.SELECTION_NEW)
#weightTag.GetObject().SetBit(c4d.BIT_ACTIVE)
# update weightManager / doesn't make any difference..
#wmgr.SetDirty(doc)
#wmgr.Update(doc)
#c4d.EventAdd()
# autoWeight func
wmgr.SelectAllJoints(doc)
bla = wmgr.AutoWeight(doc)
print(bla) # prints True, but not in the right way :{
c4d.EventAdd()
if __name__=='__main__':
main()