• Test "Lock Overrides" in Python

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    792 Views
    ferdinandF
    Hello @danielsian, without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state from this topic. Thank you for your understanding, Ferdinand
  • 0 Votes
    5 Posts
    1k Views
    pyxelriggerP
    Hmm thank you!! It's not as difficult as I imagined I just had to make a change in the formula for some case, I used: x = focaldistance*math.tan(h/2)*1 [image: 1644929034240-96f1960e87e92c0bd8b3f677b453172d.gif]
  • Strip Texture Path using Python

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hello @djoneeeee, without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state from this topic. Thank you for your understanding, Ferdinand
  • 0 Votes
    3 Posts
    818 Views
    D
    Thank you ferdidand, Sorry for not giving more contextual code... Yeah "potential ports" is what I would be interested in. Thanks for confirming that there is nothing in the API that would help me though!
  • ShowBitmap() from website URL

    Cinema 4D SDK python r25
    3
    2
    0 Votes
    3 Posts
    435 Views
    gheyretG
    @ferdinand Wow! you perfectly solved my problem! Thank you!
  • Set Base View Rotation and Position

    Cinema 4D SDK python
    11
    0 Votes
    11 Posts
    2k Views
    ferdinandF
    @cairyn said in Set Base View Rotation and Position: @ferdinand said in Set Base View Rotation and Position: So, when a user has linked a camera to a viewport, e.g., set a camera as a rendering camera, this line of code will make that camera inactive and default to the internal viewport camera. Yep, that was the intent since the OP said they did not want a camera in the scene ("I need not to have this camera on the scene") but I may have misinterpreted the meaning. Not familiar with how 3dsMax handles its cameras. Yeah, I figured that this was probably intentional, but I just wanted to clarify that it is a bit of an odd thing to do. Cheers, Ferdinand
  • Keyframe Texture Tag with no material

    Cinema 4D SDK python r25
    6
    0 Votes
    6 Posts
    1k Views
    a_blockA
    Sorry, for causing extra work
  • 0 Votes
    3 Posts
    1k Views
    ferdinandF
    Hello @davidweidemann, Thank you for reaching out to us and solving your own question :). To give a bit of background information, parameters can be composed in Cinema 4D. The simplest example is a parameter of type c4d.Vector. You can access the relative position of an object like this: >>> Cube[c4d.ID_BASEOBJECT_REL_POSITION] Vector(0, 0, 0) But as users might want to access and animate the components of that vector individually, the vector is dealt with and represented as a parameter actually as a set of sub-channels, one for each of its components. >>> Cube[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] 0.0 >>> Cube[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Y] 0.0 >>> Cube[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Z] 0.0 >>> This is why DescId are composed out of up to three DescLevel. To access the component of a vector you need two DescLevel, e.g., c4d.ID_BASEOBJECT_REL_POSITION and c4d.VECTOR_X. And while you might not be able to deal with the enclosing parameter, you might be able to deal with its subchannels. The input and output ports of an RSColorAbs Redshift node are of type RsColorAlpha, a parameter type that is composed of a Vector and a float, so it is effectively a four-component vector. This parameter type is not exposed to the Python API, so the API has no clue what to do with it. But it can deal with the subchannels. # Python has no clue about that parameter type at REDSHIFT_SHADER_RSMATHABSCOLOR_INPUT. >>> RSColorAbs[c4d.REDSHIFT_SHADER_RSMATHABSCOLOR_INPUT] Traceback (most recent call last): File "console", line 1, in <module> AttributeError: Parameter value not accessible (object unknown in Python) # But we can access the subchannels which are standard types. This is a two DescLevel access >>> RSColorAbs[c4d.REDSHIFT_SHADER_RSMATHABSCOLOR_INPUT,c4d.REDSHIFT_COLORALPHA_COLOR] Vector(0, 0, 0) # We can even reach into the subchannels of a subchannel, here for example to access the red # component of the RGBA vector tuple that is represented by the type RsColorAlpha. >>> RSColorAbs[c4d.REDSHIFT_SHADER_RSMATHABSCOLOR_INPUT,c4d.REDSHIFT_COLORALPHA_COLOR, c4d.VECTOR_X] 0.0 Cheers, Ferdinand
  • The second "call command" cannot be executed

    Cinema 4D SDK python s24
    6
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hello @mari, without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state from this topic. Thank you for your understanding, Ferdinand
  • 0 Votes
    7 Posts
    2k Views
    ferdinandF
    Hello @z-prich, without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state of this topic. Thank you for your understanding, Ferdinand
  • Cinema 4D Python access Save checkbox

    Cinema 4D SDK python
    4
    1
    0 Votes
    4 Posts
    658 Views
    C
    Thanks so much @m_adam and @Cairyn for your answers!
  • 0 Votes
    4 Posts
    757 Views
    ferdinandF
    Hello @sean1832 , without any further activity before Wednesday, the 16.03.2022, we will consider this topic as solved and remove the "unsolved" state of this topic. Thank you for your understanding, Ferdinand
  • 0 Votes
    3 Posts
    809 Views
    D
    @m_magalhaes said in Copying Take Overrides from an object to another via Python not working properly: adding the backupvalue You are master! thanks my friend, it's working!
  • 0 Votes
    3 Posts
    727 Views
    M
    Thanks, @m_magalhaes yes my code is inside the drawcell() method. I didn' have any luck with c4d.gui.GetIcon(lIconID) but i got c4d.bitmaps.InitResourceBitmap(resource_id) working. here are my 3 lines of code that got me an icon. ICON_SIZE = drawinfo["height"] bmp = c4d.bitmaps.InitResourceBitmap(12098) geUserArea.DrawBitmap(bmp, drawinfo["xpos"], drawinfo["ypos"], ICON_SIZE, ICON_SIZE, 0, 0, bmp.GetBw(), bmp.GetBh(), c4d.BMP_ALLOWALPHA) kind regards mogh
  • Best practice getting all objects in a certain Null

    Moved Cinema 4D SDK
    12
    0 Votes
    12 Posts
    2k Views
    M
    Found the problem I tried to Kill a document which was not alive, don't know if this is necessary with a merge. if c4d.C4DAtom.IsAlive(temp): c4d.documents.KillDocument(temp) And another gotcha c4d.documents.SetActiveDocument(temp) seems to be mandatory if you want to use CallCommand() -> and do not to forget to set the doc back to active after your routine. Thank you
  • Table With TreeViewCustomGui with no Tree Icon

    Cinema 4D SDK r21 python
    3
    1
    0 Votes
    3 Posts
    899 Views
    mikeudinM
    @mogh Thank you very much!
  • Compare Matrices Matrix with matrix.__eq__

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    798 Views
    M
    I was suspecting something like this ... Thanks for taking the time to type a solution which I could copy ...
  • How to activate the recent Saved Document

    Cinema 4D SDK python r25
    3
    0 Votes
    3 Posts
    565 Views
    M
    No stupid me, overlocked this ... thanks for the hint Frank.
  • Set "Strength" on Constraint tag via Python Xpresso Node?

    Cinema 4D SDK
    2
    0 Votes
    2 Posts
    476 Views
    J
    Ok, nevermind... I got something working about 3 minutes after posting this question. I'll paste below what worked for my needs. Maybe this will help someone else, or maybe you all have a more direct method to achieve this. def main(): #inputs to the Xpresso Node are Link (named "LayerLink") and Float (named "FieldtInfluence") myObject = LayerLink myTag = myObject.GetTag(1019364) myTag.SetParameter(c4d.ID_CA_CONSTRAINT_TAG_AIM_TWEIGHT, FieldInfluence, c4d.DESCFLAGS_SET_0)
  • 0 Votes
    3 Posts
    668 Views
    ferdinandF
    Hello @Tomoya, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand