@m_adam Thank you for your answer. C++ documentation have a "Example" show how to use flags in CAMorph.SetMode, but python documentation not (at least in R21.022), i compared the C++ code with Python, then went back to the C++ documentation and found this.
Best posts made by Jmelon
Latest posts made by Jmelon
I get it, CAMorph.SetMode(doc, tag, flags, mode) flags must include CAMORPH_MODE_FLAGS_EXPAND, i used to use CAMORPH_MODE_FLAGS_ALL because is marked with "ALL". it is Documentation error?
hi,
i try to convert my cpp code to python and find CAMorphNode.SetPointCount() always return false. Ensure CAMorphNode.GetInfo() == c4d.CAMORPH_DATA_FLAGS_POINTS (Pose Morph Tag is in Points mode) and can get correct number from CAMorphNode.GetPointCount(), but also not work. Do I need to do something different from cpp or is this a bug?
hope your answer!
@m_magalhaes thanks, looking forward to the next update :)
Hi,
GvNode.OperatorSetData(type, data, mode) invalid in R21 when attempt to add pose strength port on posemorph tag object node. The following script shows this problem. it's the same in C++, and mouse drag also can't add port too( I guess it also uses this API ).
import c4d
from c4d import gui
#project setting:
#1: create a baseobject, add posemorph tag, xpresso tag
#2: choose Points Mode in posemorph tag and switch to Animation Mode, select xpresso tag
#3: run script
def main():
doc = c4d.documents.GetActiveDocument()
tag = doc.GetActiveTag()
if not tag.IsInstanceOf(c4d.Texpresso):
return
master = tag.GetNodeMaster()
objectNode = master.CreateNode(master.GetRoot(), c4d.ID_OPERATOR_OBJECT)
if objectNode is None:
return
posemorphTag = tag.GetNext()
if posemorphTag is None or not posemorphTag.IsInstanceOf(c4d.Tposemorph):
return
if not objectNode.OperatorSetData(c4d.GV_ATOM, posemorphTag, c4d.GV_OP_DROP_IN_BODY):
return
descID = c4d.DescID(c4d.DescLevel(4000),c4d.DescLevel(1101)) # frist pose port DescID
data = {"did":descID, "arr":[posemorphTag]}
if not objectNode.OperatorSetData(c4d.GV_DESCID, data, c4d.GV_OP_DROP_IN_INDOCK):
print("Error")
return
c4d.EventAdd()
if __name__=='__main__':
main()
@m_adam disappointed :disappointed_relieved: :disappointed_relieved: :disappointed_relieved: , thank you for your answer.
And if i create my own GvOperatorData, can i get the message when change Port Index by mouse Drag?
@s_bach just a sudden thought when i use GvPort* GetInPort(Int32 index) go through all the InPorts. i attempt to change InPorts index but failed, is there a way to do that?
hi,
i noticed drag port can change the ports order,but haven't find any message about how to resort the GvNode Port index in SDK, is this possible by code?
hope your help.
@m_magalhaes Thank you, is all right. and sorry for my negligence, I will pay attention next time. :)
Hello,
I m confuse about how to use BaseDraw::DrawObject/DrawPolygonObject draw constant color like Display Tag Constant Shading mode?
hope for your help!