• Close Cinema 4D with C++ plugin??

    Cinema 4D SDK c++ r21
    3
    0 Votes
    3 Posts
    415 Views
    J
    That is a great idea! Thank you!
  • 0 Votes
    9 Posts
    1k Views
    B
    @m_adam Thanks for the response. RE: without enabling the Post Deformers option. It seems like so. I initially thought I could reverse engineer it by getting the point's skin influence (its joint and its weight) and in a way factor it with the intended world vector. However, I gave up since I realize point can have several joints and several weight. Haha Don't get me wrong, enabling the post deformer works as expected. The problem comes because of its inherent nature "calculate the points position of the morph after they are deformed by a Deformer." It presupposes that the (near) last deformation comes from the pose morph. For example, Squash/Stretch>Bulge>Bend>Twist>Pose Morph. However, there are cases where the intended deformation is Pose Morph>Squash/Stretch>Bulge>Bend>Twist. So having the post deformer off while still getting the world position desired gives a bit of flexibility. Anyhow, thanks again for the help. I'll just use the post deformer for now and see where I get stuck. Have a great day ahead!
  • 0 Votes
    3 Posts
    381 Views
    B
    @m_adam Thanks for the response. #1 option works as expected.
  • GetRad() and GetMp() for Selected Points?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    366 Views
    B
    @zipit Thanks for the response. I was able to compute the bounding box as you mentioned. I went with the #2 route. Though I have problem with creating the FFD deformer, but that would be for another thread.
  • How to enforce StatusBar redraws

    Cinema 4D SDK r21 python windows
    11
    0 Votes
    11 Posts
    1k Views
    M
    I am also having trouble to get the Status bar to update while a script is running. My old scripts using Callcomand nevertheless update the Status bar fine ...?!? nevermind got it working again ... mistake on my end. (passed a small flot to the statusbar instead of 0-100. kind regards mogh
  • Splinefield radius reset to 0 when using takes

    Cinema 4D SDK r20 r21
    3
    0 Votes
    3 Posts
    487 Views
    M
    Hi @pyr I don't think there is anything related to the SDK and its a Cinema 4D bug so I invite you to post it on https://support.maxon.net/open.php On the contrary, if you experience this bug only via a script please post your script here so we can help you. Cheers, Maxime.
  • Shader plugin & object

    Cinema 4D SDK
    7
    0 Votes
    7 Posts
    1k Views
    Y
    I have time and you have my attention sir Manuel! I'm looking forward for this I think adding this feature to C4D will be a good improvement... at least, for those who are interested in. Thank you again
  • Create a Redshift Camera with Python

    General Talk python r21
    3
    0 Votes
    3 Posts
    670 Views
    C
    Thanks! For whatever reason I couldn't get that particular code to work, but I eventually figured out a different method. I think my script is finished for now.
  • 0 Votes
    6 Posts
    1k Views
    C
    @Cairyn Thanks for this fantastic resource, I will definitely use this summer to level up with Python.
  • "Axis Center " Script button reuse problem

    General Talk r21 python
    3
    0 Votes
    3 Posts
    690 Views
    X
    Thank you very much for your help to solve the previous doubts. I will continue to work hard.
  • 0 Votes
    8 Posts
    1k Views
    indexofrefractionI
    I also just ran into this... < R24 you dont have BaseList2D.IsNodeBased, but as a small hack you can do: def isNodeMaterial(op): return True if op.GetType == c4d.Mmaterial and '[Node]' in op.GetBubbleHelp() else False
  • 0 Votes
    6 Posts
    977 Views
    P
    Ah sorry.
  • Using Console Variable in the Script Manager?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    409 Views
    B
    @m_magalhaes Thanks for the confirmation. Although what zipit provided also works for my use case (i.e. defining the variable from Document B but using that same variable in Document A) @zipit Thanks for the code. It works as expected
  • Copy, Paste, Flip X a Pose Morph Target?

    Cinema 4D SDK r21 python
    12
    0 Votes
    12 Posts
    3k Views
    B
    @m_magalhaes @zipit I managed to flip the mesh (not necessarily a pose morph target since I'd have to know the API). Anyhow, here is a demo of it working: https://www.dropbox.com/s/bh4p26s4m9qwljw/c4d272_flip_miror_mesh.mp4?dl=0 Here is wip script. It only works if the x-axis is dead set on 0. Also, it is slow since it has to loop within a loop. import c4d from c4d import gui # Main function def main(): neutral_geo = doc.SearchObject('neutral_geo') posed_geo = doc.SearchObject('posed_geo') neutral_world_matrix = neutral_geo.GetMg() posed_world_matrix = posed_geo.GetMg() neut_lcl_pnts = neutral_geo.GetAllPoints() neut_gbl_pnts = [point * neutral_world_matrix for point in neut_lcl_pnts] posed_lcl_pnts = posed_geo.GetAllPoints() posed_gbl_pnts = [point * posed_world_matrix for point in posed_lcl_pnts] match_pnts = [] left_pnts = [] right_pnts = [] for idx, point in enumerate(neut_gbl_pnts): if point[0] == 0.0: # ignore points at the world x axis continue if point[0] > 0.0: left_pnts.append((idx,point)) if point[0] < 0.0: right_pnts.append((idx,point)) for left in left_pnts: for right in right_pnts: if left[1][1] == right[1][1]: # check if Y pos match if left[1][2] == right[1][2]: # check if Z pos match if left[1][0] == -1 * (right[1][0]):# check if X pos are inverse match_pnts.append((left[0],right[0])) for pnt in match_pnts: reversed_left = posed_lcl_pnts[pnt[1]] reversed_left[0] = reversed_left[0] * -1 reversed_right = posed_lcl_pnts[pnt[0]] reversed_right[0] = reversed_right[0] * -1 posed_geo.SetPoint(pnt[0], reversed_left) posed_geo.SetPoint(pnt[1], reversed_right) posed_geo.Message(c4d.MSG_UPDATE) c4d.EventAdd() # Execute main() if __name__=='__main__': main()
  • Python Render Token - no frame number?

    Cinema 4D SDK r21
    3
    0 Votes
    3 Posts
    474 Views
    CairynC
    @m_adam Thanks for the confirmation! (I swear I'm not doing this on purpose...)
  • Setting Strength Values of the Pose Morph Target?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    840 Views
    B
    @PluginStudent @m_magalhaes Thanks for the reference link and sample code. It works as expected. Thanks also for the giving different methods in setting the strength. Provides more flexibility.
  • 1 Votes
    3 Posts
    365 Views
    CairynC
    @m_magalhaes thanks, that'll do!
  • Single Tag in its own folder in the right click menu

    Cinema 4D SDK r21 c++
    3
    0 Votes
    3 Posts
    407 Views
    ManuelM
    hi, I opened a bug entry. Cheers, Manuel
  • Parent Behavior on a "Script" Form

    Cinema 4D SDK r21 python
    8
    0 Votes
    8 Posts
    776 Views
    B
    @Cairyn Thanks for the confirmation. I'll just continue with the revised script until I find a bug (lol). RE: Ah. Don't the built-in mirror functions suffice? Not really. Correct me if I'm wrong, The built-in mirror tool 1) mirrors only the objects itself and not the mirror plane 2) when it mirrors, it creates additional copy. might be good when you are modelling and rigging, but not on animating. Again, thank you for the detailed responses. Appreciate it alot. Have a great day ahead!
  • Add Custom Command in the Content Browser?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    363 Views
    B
    @m_adam Thanks for the confirmation. Will close this for now.