Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Jmelon
    3. Posts
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 14
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Jmelon

    • RE: CAMorphNode.SetPointCount() always return false

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

      posted in Cinema 4D SDK
      J
      Jmelon
    • RE: CAMorphNode.SetPointCount() always return false

      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?

      posted in Cinema 4D SDK
      J
      Jmelon
    • CAMorphNode.SetPointCount() always return false

      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!

      posted in Cinema 4D SDK python r21
      J
      Jmelon
    • RE: GvNode.OperatorSetData() INVALID IN R21 WHEN WORK ON POSEMORPH TAG' POSE STRENGTH

      @m_magalhaes thanks, looking forward to the next update 🙂

      posted in Cinema 4D SDK
      J
      Jmelon
    • GvNode.OperatorSetData() INVALID IN R21 WHEN WORK ON POSEMORPH TAG' POSE STRENGTH

      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()
      
      posted in Cinema 4D SDK r21
      J
      Jmelon
    • RE: Is there a way to change the GvNode Port Index

      @m_adam disappointed 😥 😥 😥 , thank you for your answer.
      And if i create my own GvOperatorData, can i get the message when change Port Index by mouse Drag?

      posted in Cinema 4D SDK
      J
      Jmelon
    • RE: Is there a way to change the GvNode Port Index

      @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?

      posted in Cinema 4D SDK
      J
      Jmelon
    • Is there a way to change the GvNode Port Index

      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.

      posted in Cinema 4D SDK c++ r21
      J
      Jmelon
    • RE: How to use BaseDraw::DrawObject/DrawPolygonObject draw constant color like Display Tag Constant Shading mode

      @m_magalhaes Thank you, is all right. and sorry for my negligence, I will pay attention next time. 🙂

      posted in Cinema 4D SDK
      J
      Jmelon
    • How to use BaseDraw::DrawObject/DrawPolygonObject draw constant color like Display Tag Constant Shading mode

      Hello,
      I m confuse about how to use BaseDraw::DrawObject/DrawPolygonObject draw constant color like Display Tag Constant Shading mode?
      hope for your help!

      posted in Cinema 4D SDK c++ r20
      J
      Jmelon
    • RE: std compile error

      @m_magalhaes thank you! switch to 2015(v140) is all right : )

      posted in Cinema 4D SDK
      J
      Jmelon
    • RE: std compile error

      @m_magalhaes use r19 sdk , not change any thing, just add two line in main.cpp:

      ...//other head file
      #include <string>
      Bool PluginStart()
      {
      	VERSIONTYPE versionType = GeGetVersionType();
      
      	std::string test;
              ...
      }
      

      it will case same error. not only std::string, other like std::vector, std::set also fail. looks like something conflict with std in r19.

      posted in Cinema 4D SDK
      J
      Jmelon
    • std compile error

      hi,
      i meet compile error when use std in r19, the specific error prompts and simple test codes are as follows

      //main.cpp
      #include "c4d.h"
      #include "main.h"
      #include <string>
      
      Bool PluginStart()
      {
         std::string test;
              ...
      }
      
      

      errors:

      Error	C2784	'const _Ty &std::_Max_value(const _Ty &,const _Ty &) noexcept': could not deduce template argument for 'const 
                      _Ty &' from 'unsigned __int64'    
                      e:\visualstudio2017\vc\tools\msvc\14.16.27023\include\xmemory0	45	
      Error	C2782	'const _Ty &std::_Max_value(const _Ty &,const _Ty &) noexcept': template parameter '_Ty' is ambiguous		 
                      e:\visualstudio2017\vc\tools\msvc\14.16.27023\include\xmemory0	45	
      Error	C2672	'_Max_value': no matching overloaded function found	 
                      e:\visualstudio2017\vc\tools\msvc\14.16.27023\include\xmemory0	43	
      
      

      it no errors in r20, and if any additional considerations in r19 when use std?

      hope your help!

      posted in Cinema 4D SDK r19 c++
      J
      Jmelon