• 0 Votes
    9 Posts
    2k Views
    B
    @Dunhou Thanks for the reference but yea I'm unfortunately using the xpresso here instead of the new node editor. Which in all regards, an unfortunate scenario is xpresso is not integrated to the new node editor. @m_adam Gotcha. Thanks. Looking forward to the update.
  • Determine if a polygon is facing the camera

    General Talk python r20
    5
    0 Votes
    5 Posts
    976 Views
    R
    Once again, thank you, Manuel. I had to do a few changes and it is working now. I even made it select the faces that are within a certain angle from the camera. Here is my code: for i,poly in enumerate(faces): a,b,c,d = poly.a,poly.b,poly.c,poly.d pta = points[a]*mg ptb = points[b]*mg ptc = points[c]*mg ptd = points[d]*mg v1 = pta-ptb v2 = ptb-ptc normal = v1.Cross(v2) normal.Normalize() if c != d: center = c4d.Vector((pta.x+ptb.x+ptc.x+ptd.x)/4.0,(pta.y+ptb.y+ptc.y+ptd.y)/4.0,(pta.z+ptb.z+ptc.z+ptd.z)/4.0) else: center = c4d.Vector((pta.x+ptb.x+ptc.x)/3.0,(pta.y+ptb.y+ptc.y)/3.0,(pta.z+ptb.z+ptc.z)/3.0) direction = cam_off - center norm_dir = direction.GetNormalized() angle = NINETY - normal.Dot(norm_dir) if (angle > 0.0 and angle < max_ang): selection.Select(i)
  • Reacting on Treeview user action

    Cinema 4D SDK r21 r20 python
    2
    0 Votes
    2 Posts
    311 Views
    P
    I found a reply here. https://developers.maxon.net/forum/topic/11447/get-message-from-treeview-gui-dialog/2
  • BaseDraw scale

    Cinema 4D SDK r19 r20 r21 c++
    3
    0 Votes
    3 Posts
    541 Views
    rsodreR
    @r_gigante Thanks, I used an inverse scale matrix wen calculating my gizmo points.
  • No multiple selection in Treeview not working?

    Cinema 4D SDK r21 r20 python
    12
    0 Votes
    12 Posts
    2k Views
    P
    Thanks, that solved the issue. -Pim
  • Setting UA vertical size

    Cinema 4D SDK r21 python r20
    3
    1
    0 Votes
    3 Posts
    369 Views
    P
    Ok, something to think about. Never considered using GeuserArea.LayoutChanged when changing the UA size. I will give it a try.
  • 0 Votes
    4 Posts
    673 Views
    r_giganteR
    Hi sean, thanks for reaching out us. The broken forward compatibility between R20 and R21 is reported on Changes in R21. With regard to backward binary compatibility, it has never been possible to run a plugin built against a more recent API and load on a previous Cinema 4D executable as reported on Portability and Compatibility. Best, R.
  • UA is update too often

    Cinema 4D SDK r21 r20 python
    3
    0 Votes
    3 Posts
    715 Views
    P
    Thanks for the answer. And yes, you are fully correct. Things should not be done in DrawMsg()
  • Adding a icon to a treeview field.

    Cinema 4D SDK r20 r21 python
    9
    1
    0 Votes
    9 Posts
    2k Views
    P
    Yes, that solved it. Thanks.
  • SculptTag

    Cinema 4D SDK r20 python windows
    6
    0 Votes
    6 Posts
    768 Views
    M
    The bug is fixed in S22. Cheers, Maxime.
  • SculptObject GetPolygonCopy() documentation

    Cinema 4D SDK python r20 r21
    5
    1 Votes
    5 Posts
    764 Views
    M
    Hi, This is solved in the last documentation update. Cheers, Maxime.
  • 0 Votes
    3 Posts
    1k Views
    L
    Manuel, thanks for taking the time and posting some links. Last night I was reading up on the Matrix and trying wrapping my head around it. I think I was stuck in the wrong area, I was trying to convert a baseObject to a pointObject to do the transformations.I would perfer not to have to open the axis window, but instead handle all this in a Python Function. I will look over the docs and samples to get a better idea of what I need to do. Thanks again for taking the time to respond to my post!
  • 0 Votes
    2 Posts
    979 Views
    M
    https://developers.maxon.net/forum/topic/11570/plugin-affecting-c4d-modules-startup/9
  • OperatorSetData for "Lists"?

    Cinema 4D SDK python r20
    5
    0 Votes
    5 Posts
    845 Views
    r_giganteR
    @esan said in OperatorSetData for "Lists"?: Another quick question. is there still a bug on c4d.GV_OBJECT_OPERATOR_OBJECT_OUT? Yes it's still there and being R20 maintenance ended it's likely to remain. Best, R
  • Merge Tags

    Cinema 4D SDK r19 r20 r21 c++
    9
    0 Votes
    9 Posts
    1k Views
    r_giganteR
    Hi @C4DS, thanks for following up. One note that it's worthy to share: the outcomes of this thread are valid as long as you need to stick to Classic API. In Maxon API (R20 and higher) you can make very good use of the CustomDataTag (see also GitHub example) whose data merging is managed directly by the modeling kernel. Last but not least, as usual, if the discussion has come to an end, please don't forget to mark the question as SOLVED. Cheers, R
  • Drag&Drop an image in a gui field

    Cinema 4D SDK r20 python
    5
    1
    0 Votes
    5 Posts
    1k Views
    D
    @pim I'm trying to figure out how you did this. Could you please share a sample code of this example? I'm trying to get the full path of an image by dragging it into a edit text field... Cheers
  • Threading & job questions

    Cinema 4D SDK r20 r21 maxon api c++
    6
    1
    0 Votes
    6 Posts
    1k Views
    ManuelM
    hello, wow sorry this went out of my scope. Anything to add or can we set this thread to solved ? Cheers, Manuel
  • Dragging an object from a treeview

    Cinema 4D SDK r20 python
    4
    1
    0 Votes
    4 Posts
    624 Views
    P
    Thanks, sounds a bit complicated, so I have to give it some thoughts. For now, it is enough. -Pim
  • Treeview and Right Click

    Cinema 4D SDK python r20
    3
    1
    0 Votes
    3 Posts
    420 Views
    P
    @mp5gosu said in Treeview and Right Click: RemoveData() Great, thanks.
  • Insert object in Treeview

    Cinema 4D SDK r20 python
    4
    0 Votes
    4 Posts
    1k Views
    P
    Thanks, great explanation! One small issue. Delete doesn't work because objParent' is not defined. Traceback (most recent call last): File "scriptmanager", line 251, in DeletePressed NameError: global name 'objParent' is not defined Here the code that, I think, solves the issue: def DeletePressed(self, root, userdata): "Called when a delete event is received." for tex in reversed(list(TextureObjectIterator(self.listOfTexture))): if tex.IsSelected: objParent = tex.GetParent() # Added listToRemove = objParent.GetChildren() if objParent is not None else self.listOfTexture listToRemove.remove(tex)