• 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.
  • Alembic camera properties

    Cinema 4D SDK python r21
    2
    0 Votes
    2 Posts
    727 Views
    ManuelM
    Hello, Some symbols are not exposed to public. There's no particular reason for that. There's no real place where all exposed symbols are. (and we agree it's could be nice) To know if a BaseObject is a camera (or something) you can use IsInstanceOf You can also send a message using the ID MSG_GETREALCAMERADATA : with an alembic generator you can use this code : camera = doc.GetActiveObject() if camera is None: return if camera.IsInstanceOf(c4d.Oalembicgenerator) == False: return # This example tries to get the internal camera from a generator. # Typically used with the Alembic Generator camera. data = {} data["res"] = None res = camera.Message(c4d.MSG_GETREALCAMERADATA, data) if res: camera = data["res"] print("Camera: " + camera.GetName()) For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. How to Post Questions especially the tagging part. I've marked this thread as a question so when you considered it as solved, please change the state Cheers, Manuel
  • Determine if a polygon is facing the camera

    General Talk python r20
    5
    0 Votes
    5 Posts
    1k 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
    373 Views
    P
    I found a reply here. https://developers.maxon.net/forum/topic/11447/get-message-from-treeview-gui-dialog/2
  • 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
    411 Views
    P
    Ok, something to think about. Never considered using GeuserArea.LayoutChanged when changing the UA size. I will give it a try.
  • Adding my own field to the Preference dialog

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    457 Views
    P
    Thank you. I will look into it and try it.
  • UA is update too often

    Cinema 4D SDK r21 r20 python
    3
    0 Votes
    3 Posts
    942 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.
  • Make Button Invisible And Still Occupies Space?

    Cinema 4D SDK r21 python
    7
    0 Votes
    7 Posts
    2k Views
    B
    @PluginStudent @s_bach Thank you for the response. Both works as expected. RE: don't know why you think you need two groups. Just for reference, I was thinking of this logic if self.mode == True: self.Group1_Layout() else: self.Group2_Layout() Anyhow, no further action required
  • 0 Votes
    3 Posts
    446 Views
    B
    Thanks for the explanation. Works as expected.
  • Exporting Motion Clips & what are .c4dsrc Files?

    Cinema 4D SDK sdk python
    3
    0 Votes
    3 Posts
    751 Views
    ?
    @m_adam Hi Maxime, thank you for the quick reply and insight into this. I look forward to trying this.
  • AddUserData() for In/Exclusion List?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    475 Views
    B
    @r_gigante Thanks for the response. Works as expected.
  • Listening for Selection Events

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    709 Views
    ManuelM
    hello, To retrieve the active object you have to iteration trough the hierarchy. (even GetActiveObject) In Python, GetActiveObjects is calling a c++ function so with lots of object it will be faster than iterating the hierarchy with python functions. We don't know what the limit is. To mesure that you have to make a bunch of tests with different scenarios and get the mean. Cheers, Manuel
  • 0 Votes
    3 Posts
    435 Views
    B
    @m_magalhaes Thanks for the confirmation.
  • Getting GeDialog Group Width & Height?

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    398 Views
    ?
    @r_gigante Thank you, Riccardo! I don't know how I missed that in the documentation, but it is what I needed.
  • How to catch SubDialog errors?

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    488 Views
    mikeudinM
    Thanks! So will find some workaround.
  • Move Tag Position in the Stack?

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    1k Views
    B
    @r_gigante Gotcha. Thanks for the warning.
  • SculptTag

    Cinema 4D SDK r20 python windows
    6
    0 Votes
    6 Posts
    1k Views
    M
    The bug is fixed in S22. Cheers, Maxime.