• c4d.Vector.__init__ does not accept named arguments

    r23 r21 sdk python windows
    4
    1 Votes
    4 Posts
    470 Views
    ferdinandF
    Hi, I did not really expect an answer, I just did put it up to make you guys aware. Regarding your reply, I agree with most of it and am aware that there a some hurdles to overcome in mapping C++ interfaces to Python, i.e. that you do run into problems in general when you want to express overloaded methods in Python. But as @mp5gosu pointed out, my major point was that the function does not accept named arguments at all. Which is mainly a problem because the docs tell you explicitly otherwise in two ways. First of all the docs say explicitly that all arguments are optional which implies for Python usually that I can pick and choose in which arguments I can pass by passing named arguments. And secondly, you print out the signature as Vector.__init__(x=0.0, y=0.0, z=0.0) which implies the same. I would have probably ignored all this and booked it under "that's for me to know and for you to find out", if it wasn't for the fact that the method does not raise a TypeError on attempts of feeding it with such unknown named arguments. Which can make this quite critical IMHO. Cheers, zipit
  • CAMorphNode.SetPointCount() always return false

    python r21
    5
    0 Votes
    5 Posts
    730 Views
    J
    @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.
  • Iterate over the View/Hotspots of Visual Selector Tag

    r21 python
    5
    0 Votes
    5 Posts
    555 Views
    B
    RE: This is a limitation you also have with the visual selector Not really. You can multiple select hotspots and/or controllers in the visual selector. Anyhow, thanks for the response. I guess there is no way around this.
  • Combine UV and worldposition while shader rendering

    python
    4
    2
    0 Votes
    4 Posts
    817 Views
    ManuelM
    hi, I had a look but as @zipit said, there's not way in python. Cheers, Manuel
  • OBJECT_INPUT Child Updating

    sdk r20 c++
    13
    0 Votes
    13 Posts
    2k Views
    r_giganteR
    Hi @JohnThomas , the data passed in the method is actually carrying the destination object. The code should look like ... if (type == MSG_EDITABLE_END) { BaseObject* dstObject = static_cast<BaseObject*>(data); if (!dstObject) return false; BaseObject* child = dstObject->GetDown(); if (child) { child->Remove(); BaseObject::Free(child); } } ... Cheers, R
  • Flat UV Projection in Python

    python
    3
    0 Votes
    3 Posts
    846 Views
    ?
    Thank you very much @zipit ! That works great.
  • ObservableFinished() does not pass a job result to an observer

    c++ r21 windows
    5
    0 Votes
    5 Posts
    1k Views
    B
    Thank you very much, Manuel! This is a working solution for the issue and it helped me a lot! Best regards, Tim
  • Selecting Different components but in Different modes

    14
    0 Votes
    14 Posts
    2k Views
    ManuelM
    hi, I can't reproduce that, what version are you using ? the only moment where a coordinates could be 0 is if the point and the object's pivot are sharing the same coordinates AND you have the "Enable Axis" enable. (or you are in object's rel or abs coordinate and the point is at the same position of the pivot's object. As if you were at the same time in object's mode and in point mode. (moving the object's pivot point and the modeling axis at the same time) So this look like a bug. by the way, what do you call the "default state" ? The last modeling axis position ? the position when you selected the polygon ? Cheers, Manuel
  • doc.GetLayerObjectRoot().InsertFirst(layer) does not work.

    python r21
    9
    2 Votes
    9 Posts
    987 Views
    M
    This is fixed in R23. Cheers, Maxime.
  • FieldList, and how to properly use it

    r20 r21 s22 r23 c++
    8
    0 Votes
    8 Posts
    957 Views
    fwilleke80F
    Thank you!
  • 'SetRealTag' Request

    3
    0 Votes
    3 Posts
    463 Views
    ?
    @m_magalhaes Hi Manuel! Thanks for the update.
  • Connect C4D with Tkinter (External Application) ?

    r21 python
    12
    0 Votes
    12 Posts
    2k Views
    B
    @r_gigante Thanks for the response and the website reference. I was able to work the code with the following revisions: def CoreMessage(self, id, bc): if id == 1234: P1MSG_UN = bc.GetVoid(c4d.BFM_CORE_PAR1) pythonapi.PyCObject_AsVoidPtr.restype = c_int pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object] P1MSG_EN = pythonapi.PyCObject_AsVoidPtr(P1MSG_UN) # check message and act if (P1MSG_EN == 1): c4d.documents.GetActiveDocument().InsertObject(c4d.BaseObject(c4d.Ocube)) elif (P1MSG_EN == 2): c4d.documents.GetActiveDocument().InsertObject(c4d.BaseObject(c4d.Osphere)) Thanks again. Will close this thread now.
  • Create New Take Using Python

    Moved
    9
    0 Votes
    9 Posts
    2k Views
    D
    @m_adam Thanks for your help. Apologies for not following the rules. I'm struggling with the rules of Python at the moment so it's not surprising! Will try to be a better poster in future.
  • Unusual "NoneType" Error for GetDeformCache()

    r21 python
    12
    0 Votes
    12 Posts
    2k Views
    B
    Hi @m_magalhaes Ah gotcha. I guess I can't change the deformer's priority. Anyhow. Thanks for the confirmation.
  • Compiling the Cinema 4D R20 C++ SDK Examples

    c++ windows project tool r20
    7
    14
    7 Votes
    7 Posts
    6k Views
    B
    @m_adam Thanks. You are right. It didn't exceed 5GB. I guess 5GB is when it is uncompressed. I was able to build the plug-ins now.
  • R23 plugin windows 10 error

    r23 c++ windows
    7
    0 Votes
    7 Posts
    1k Views
    ManuelM
    @adam_k_garner said in R23 plugin windows 10 error: . Any idea why this ONE person had the issue on Windows 10? I've move your other question to a new post. Let's try to fix your issue there if we can help Cheers, Manuel
  • Unable to Set Priority Data for Skin Deformer

    r21 python
    6
    0 Votes
    6 Posts
    691 Views
    ManuelM
    @zipit said in Unable to Set Priority Data for Skin Deformer: probably overlooked correct, friday evening
  • Phong Tag with ObjectData

    python
    6
    0 Votes
    6 Posts
    1k Views
    ?
    It's working! Thank you @zipit , @r_gigante , & @m_adam ! Have an excellent weekend. A note for future readers One issue with my demo code is I wasn't passing the op from GetVirtualObjects to the CreateMyObject method. @m_adam created a new object (newObj) and only calls GetTag on the op (variable name: node). phongTag = node.GetTag(c4d.Tphong)
  • Error reading resource Line 1

    r20 c++ python windows
    3
    0 Votes
    3 Posts
    920 Views
    B
    After a LOT of testing around I finally found the culprit. The header file was encoded UTF-8 with BOM. I finally figured it out after noticing that two versions of the header file that worked or didn't work had a 3 byte difference in file size. No idea how that snuck in there, but now it finally works. Also now it makes sense that the error was pointing to line 1.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied