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
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. pyxelrigger
    • Profile
    • Following 2
    • Followers 0
    • Topics 16
    • Posts 29
    • Best 0
    • Controversial 0
    • Groups 0

    pyxelrigger

    @pyxelrigger

    0
    Reputation
    48
    Profile views
    29
    Posts
    0
    Followers
    2
    Following
    Joined Last Online
    Website twitter.com/pyxelrigger Location Rio De Janeiro // Brazil

    pyxelrigger Unfollow Follow

    Latest posts made by pyxelrigger

    • logic problem to obtain the entire hierarchy of the object

      https://developers.maxon.net/forum/topic/13045/alternative-way-to-iterate-list-other-than-getnext/3
      In my search for a solution, I came across this post that works well and returns a list of all child objects in order. However, is there a way to save lists within other lists containing all the objects so I can keep track of the hierarchy?

      maybe in this structure:
      a7f37e63-91f4-4a3f-ac41-dbd03b8ec298-image.png

               hierarchy = [obj1,  
               obj2[obj2.5, [obj2.75],
               obj3[obj4, [obj5]]
      
      posted in Cinema 4D SDK python windows 2024
      pyxelriggerP
      pyxelrigger
    • RE: Drag Object in GeDialog.AddEditText

      hmm is it not possible to add the same element that is in the user data?
      I tried using

      self.AddCustomGui(IDOBJ , pluginid=c4d.CUSTOMGUI_STRING, flags=c4d.BFH_SCALEFIT, minw=0, minh=0, customdata=c4d.BaseContainer())
      

      but it didn't work

      posted in Cinema 4D SDK
      pyxelriggerP
      pyxelrigger
    • Drag Object in GeDialog.AddEditText

      can I drag an obj into an AddEditText to then get string?
      similar to the example I show through user data

      posted in Cinema 4D SDK windows 2024 python
      pyxelriggerP
      pyxelrigger
    • FBX does not export

      Im developing a simple script to export an .FBX just the "Joints" object of each .c4d file in a folder, it works without any errors on console but it doesn't create any .FBX file in the folder I define

      import c4d
      import os
      
      def main() -> None:
          plugin = c4d.plugins.FindPlugin(c4d.FORMAT_FBX_EXPORT, c4d.PLUGINTYPE_SCENESAVER)
          #print (plugin)
      
          data = {}
          plugin.Message(c4d.MSG_RETRIEVEPRIVATEDATA, data)
      
      
          settings = data.get("imexporter", None)
          #print (settings)
          
              
          settings[c4d.FBXEXPORT_FBX_VERSION] = False
          settings[c4d.FBXEXPORT_ASCII] = False
          settings[c4d.FBXEXPORT_CAMERAS] = False
          settings[c4d.FBXEXPORT_LIGHTS] = False
          settings[c4d.FBXEXPORT_SPLINES] = False
          settings[c4d.FBXEXPORT_INSTANCES] = False
          settings[c4d.FBXEXPORT_SELECTION_ONLY] = True
          settings[c4d.FBXEXPORT_GLOBAL_MATRIX] = False
          settings[c4d.FBXEXPORT_SDS] = c4d.FBXEXPORT_SDS_GENERATOR
          settings[c4d.FBXEXPORT_TRIANGULATE] = False
          settings[c4d.FBXEXPORT_SAVE_NORMALS] = True
          settings[c4d.FBXEXPORT_SAVE_VERTEX_COLORS] = False
          settings[c4d.FBXEXPORT_SAVE_VERTEX_MAPS_AS_COLORS] = False
          settings[c4d.FBXEXPORT_UP_AXIS] = c4d.FBXEXPORT_UP_AXIS_Y
          settings[c4d.FBXEXPORT_TRACKS] = True
          settings[c4d.FBXEXPORT_BAKE_ALL_FRAMES] = False
          settings[c4d.FBXEXPORT_PLA_TO_VERTEXCACHE] = False
          settings[c4d.FBXEXPORT_BOUND_JOINTS_ONLY] = False
          settings[c4d.FBXEXPORT_TAKE_MODE] = c4d.FBXEXPORT_TAKE_TAKES
          settings[c4d.FBXEXPORT_MATERIALS] = True
          settings[c4d.FBXEXPORT_EMBED_TEXTURES] = False
          settings[c4d.FBXEXPORT_SUBSTANCES] = True
          settings[c4d.FBXEXPORT_BAKE_MATERIALS] = True
          settings[c4d.FBXEXPORT_BAKEDTEXTURE_WIDTH] = 1024
          settings[c4d.FBXEXPORT_BAKEDTEXTURE_HEIGHT] = 1024
          settings[c4d.FBXEXPORT_BAKEDTEXTURE_RESIZE] = c4d.FBXEXPORT_BAKEDTEXTURE_RESIZE_OFF
          settings[c4d.FBXEXPORT_BAKEDTEXTURE_FORMAT] = int(8)
          settings[c4d.FBXEXPORT_BAKEDTEXTURE_DEPTH] = c4d.FBXEXPORT_BAKEDTEXTURE_DEPTH_8
          settings[c4d.FBXEXPORT_LOD_SUFFIX] = False
      
      
          c4dfilesfolder = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_ANYTHING, '.C4D Animations Folder', c4d.FILESELECT_DIRECTORY, '','', '')
          c4dfileslist = os.listdir(c4dfilesfolder)
      
      
          exportpath = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_ANYTHING, 'Save .FBX Files', c4d.FILESELECT_DIRECTORY, '','', '')
          
          c4dpath = ''
          for file in c4dfileslist :
              c4dpath = '{}\{}'.format(c4dfilesfolder, file)
              doc = c4d.documents.LoadDocument(c4dpath, c4d.SCENEFILTER_OBJECTS)
              if not doc:
                  print ('NONE DOC')
              else:
                  
                  doc.SetSelection(doc.SearchObject('Joints'), c4d.SELECTION_NEW)
                  c4d.documents.SaveDocument(doc, exportpath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, c4d.FORMAT_FBX_EXPORT)
                  c4d.documents.KillDocument(doc)
              
      if __name__ == '__main__':
          main()
      
      posted in Cinema 4D SDK windows 2024 python
      pyxelriggerP
      pyxelrigger
    • Plugin in the top bar with Python

      Is it possible for me to create a Python plugin similar to this example I put together? Like a top bar, commands, and a menu, my doubt is whether I need to register the plugin differently.
      example.png

      posted in Cinema 4D SDK 2024 python windows
      pyxelriggerP
      pyxelrigger
    • Get alls ID User Data of Object

      I need to check if an object has user data and get all the IDs for each one.
      I tried op[c4d.ID_USERDATA], but it doesn't work, I imagine it's not that simple to do, i lot of searching, maybe it's something related to c4d.DescID() , I'd like to understand

      posted in Cinema 4D SDK 2024 python windows
      pyxelriggerP
      pyxelrigger
    • is it possible for me to create a script, outside of c4d

      Guys, I don't know if it's a very noob question, but is it possible for me to create a script, outside of c4d, in this example for testing, I have a Cube in my scene and I would like to print it when I click on a button that opens in the Tkinter window

      11ab2da8-7407-44dc-a9be-fb51bec1cfc0-image.png

      posted in Cinema 4D SDK python 2024 windows
      pyxelriggerP
      pyxelrigger
    • RE: when I use .GetMg() after the script is finished it seems to return the right results

      Thanks, buddy! It worked. To be honest, I never really understood what Message(c4d.MSG_UPDATE) was all about, and now ExecutePasses is new to me

      posted in Cinema 4D SDK
      pyxelriggerP
      pyxelrigger
    • when I use .GetMg() after the script is finished it seems to return the right results

      When I use .GetMg() after the script is finished it seems to return the right results
      Is this a bug? maybe rerelated to the IK Tag

      posted in Cinema 4D SDK python 2024 windows
      pyxelriggerP
      pyxelrigger
    • Is it possible somehow with python to change the path that for example the Open Project window will open?

      I want to develop a plugin that defines the path of the folder that the open project window will open

      posted in Cinema 4D SDK
      pyxelriggerP
      pyxelrigger