Group Details Private

administrators

  • RE: bc lost stored mesh

    hi,

    as @zipit said, you are storing a baselink in the basecontainer, not the object itself.

    Your GVO should return None only in case of Memory Error as it's noted on the documentation

    That said, i don't understand what you are trying to do and why.

    it stores the current values into a bc
    witch values do you want to store ? Or is it the current state of the object you want to store ?

    Cheers,
    Manuel

    posted in Cinema 4D Development
  • RE: how can I convert a c4d file to fbx format

    As said by @PluginStudent and @r_gigante
    Python SDK = Can only be used within Cinema 4D or c4dpy.
    C++ SDK = Only have the ability to register a plugin to be loaded in Cinema 4D.
    Cineware (previously Melange) = Use Cinema 4D file saved for Cineware without the need to have Cinema 4D installed.

    Python SDK and C++ SDK have the ability to export a C4D scene to an FBX.
    Cineware/Melange doesn't have the ability to export a C4D Scene to an FBX file.

    So if your goal is to export a C4D file to FBX you will need Cinema 4D to be installed and probably use C4D or a Cinema 4D dedicated Plugin that parse Command Line Argument to export a given file to an FBX.

    Cheers,
    Maxime.

    posted in Cineware SDK Development
  • RE: Get visible objects from viewport in commandline

    hi,
    the problem isn't coming from the fact that there's no GUI but that c4d didn't finished to initialized. Even with the UI, it's the same problem.
    I'm trying to find a place where you could/catch the right message but until now, all the solution have failed.

    But i still have one solution or two on my pocket.

    Cheers,
    Manuel

    posted in Cinema 4D Development
  • RE: How to enforce StatusBar redraws

    hi,

    just to let you know i've asked the dev about that one :)

    Cheers,
    Manuel

    posted in Cinema 4D Development
  • RE: Getting an Object to Follow Another Regardless of Hierarchy

    hi,

    i finally asked the dev if they got a better idea than myself.

    It's reproducible with our constrain tag, that's the combinaison of rotation and scale of the parent that apply to the child.

    I'm afraid it's a bit of a limitation in our system and this particular case.

    Let's see.

    Cheers,
    Manuel

    posted in Cinema 4D Development
  • RE: SnapCore and Intersect

    Hi @RenatoT, I don't think there is an issue,

    just in case Intersect is supposed to work only for guide and spline see Modeling Settings - Intersection Snap. So maybe you are looking for GeRayCollider::Interesct.

    Cheers,
    Maxime.

    posted in Cinema 4D Development
  • RE: Shader plugin & object

    hi,

    I've been looking at one possible solution but found nothing yet. As said before, you can't do that in our shader system.

    Creating your own material could help more, but you only have the displace function that only displace the points and do not change the object.
    Creating the subdivision is not possible neither.

    I will check if i find something but that could take time.

    Cheers,
    Manuel

    posted in Cinema 4D Development
  • RE: Unable to update Alembic path in xref

    I know, it's not what you expected but there is for the moment no way to automate this using Cinema 4D API.

    Cheers,
    Maxime.

    posted in Cinema 4D Development
  • RE: Get visible objects from viewport in commandline

    hi,

    it's not really clear, what is your final goal ?

    Cheers,
    Manuel

    posted in Cinema 4D Development
  • RE: Cannot Connect Xpresso Nodes in Python

    Hi, here in Cinema 4D S22 defining the type of the cloner I don't have anymore an issue

    import c4d
    from c4d import gui
    import math
    
    def main():
        # Build Parent Cloner
        cloner = c4d.BaseObject(1018544)
        cloner[c4d.ID_MG_MOTIONGENERATOR_MODE] = c4d.ID_MG_MOTIONGENERATOR_MODE_LINEAR
        doc.InsertObject(cloner)
    
        # Build Null
        newnull = c4d.BaseObject(c4d.Onull)
        newnull.InsertUnder(cloner)
    
        # Build Children Cloner
        internal_cloner = c4d.BaseObject(1018544)
        internal_cloner[c4d.ID_MG_MOTIONGENERATOR_MODE] = c4d.ID_MG_MOTIONGENERATOR_MODE_GRIDARRAY
        internal_cloner.InsertUnder(newnull)
        internal_cloner.Message(c4d.MSG_MENUPREPARE, doc)
    
        # Cube
        cube = c4d.BaseObject(c4d.Ocube)
        internal_cloner.Message(c4d.MSG_MENUPREPARE, doc)
        cube.InsertUnder(internal_cloner)
    
        # Xpresso Tag
        xtag = c4d.BaseTag(c4d.Texpresso)
        cloner.InsertTag(xtag)
    
        # Setup Parent Cloner
        cloner[c4d.MG_LINEAR_OBJECT_POSITION, c4d.VECTOR_Y] = 0.0
        cloner[c4d.MG_LINEAR_OBJECT_POSITION, c4d.VECTOR_Z] = 500.0
        cloner[c4d.MG_LINEAR_COUNT] = 10
        cloner[c4d.MGCLONER_VOLUMEINSTANCES_MODE] = c4d.MGCLONER_VOLUMEINSTANCES_MODE_RENDERINSTANCE
    
        # Setup Children Cloner
        internal_cloner[c4d.MG_GRID_SIZE] = c4d.Vector(300, 200, 100)
    
        # Setup Cube
        cube[c4d.PRIM_CUBE_LEN] = c4d.Vector(20, 10, 100)
    
        # Setup Xpresso
        # http://mograph.net/board/index.php?/topic/26338-creating-xpresso-nodes-with-python-script/
        nodemaster = xtag.GetNodeMaster()
        node1 = nodemaster.CreateNode(nodemaster.GetRoot(), c4d.ID_OPERATOR_OBJECT, None, 100, 100)
        node1[c4d.GV_OBJECT_OBJECT_ID] = internal_cloner
        gridResParam = c4d.DescID(c4d.DescLevel(c4d.MG_GRID_RESOLUTION, c4d.DTYPE_VECTOR,0), c4d.DescLevel(c4d.VECTOR_Z, c4d.DTYPE_REAL,0))
        node1out = node1.AddPort(c4d.GV_PORT_OUTPUT, gridResParam)
    
        node2 = nodemaster.CreateNode(nodemaster.GetRoot(), c4d.ID_OPERATOR_OBJECT, None, 300, 100)
        node2[c4d.GV_OBJECT_OBJECT_ID] = cloner
        posParam = c4d.DescID(c4d.DescLevel(c4d.MG_LINEAR_OBJECT_POSITION, c4d.DTYPE_VECTOR,0), c4d.DescLevel(c4d.VECTOR_Z, c4d.DTYPE_REAL,0))
        node2in = node2.AddPort(c4d.GV_PORT_INPUT, posParam)
    
        # Connect
        if node1out is not None and node2in is not None:
            node1out.Connect(node2in)
    
        c4d.EventAdd() # refreshed viewport to see changes automatically
    
    if __name__=='__main__':
        main()
    

    And as pointed by @PluginStudent the problem was because the AddPort fails. And I guess it failed because at the time you ask for the port creation since no explicit mode was defined in the Cloner the XPresso description was not properly fed so this GvPort didn't exist.

    Cheers,
    Maxime.

    posted in General Programming & Plugin Discussions