Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > PYTHON Development
  New Posts New Posts
  FAQ FAQ  Forum Search

"Connect Objects" in a Generator?

Author
Message
  Topic Search Topic Search
RashaMatt View Drop Down
Member
Member


Joined: 2018 Jul 02
Online Status: Offline
Posts: 8
Direct Link To This Post Topic: "Connect Objects" in a Generator?
    Posted: 2018 Aug 28 at 11:16pm
Is there a way to do the equivalent of "Connect Objects" (or "Connect and Delete") in a Python Generator?

I am creating a hierarchy of groups of groups of polys, and the viewport is very slow. Perhaps it would be faster if I could convert it to a single poly object and optimize it?


Edited by RashaMatt - 2018 Aug 28 at 11:17pm
Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 268
Direct Link To This Post Posted: 2018 Aug 29 at 2:18am
Hi RashaMatt, thanks for writing us.

With regard to your support request there are two options either viable.
The first is to take advantage of the modelling commands delivered in Cinema 4D by using the c4d.utils.SendModelingCommand() and use the appropriate command to achieve the desired behavior.
The second option is to hard code the merging operation directly in the generator by accessing the information about mesh points position and mesh polygons index for each entity you want to get merged, then by merging this data in a single mesh and finally by disposing the original meshes (if really needed).

Best, Riccardo
MAXON Computer GmbH
SDK Support Team
Back to Top
RashaMatt View Drop Down
Member
Member


Joined: 2018 Jul 02
Online Status: Offline
Posts: 8
Direct Link To This Post Posted: 2018 Aug 29 at 2:21am
I did not see the "Connect Object" modeling commands represented in MCOMMAND (https://developers.maxon.net/docs/Cinema4DPythonSDK/html/consts/MCOMMAND.html)

Is it available somewhere that I missed?
Back to Top
knickknack View Drop Down
Forum Moderator
Forum Moderator


Joined: 2016 Jul 01
Location: Italy
Online Status: Offline
Posts: 268
Direct Link To This Post Posted: 2018 Aug 29 at 2:53am
Hi Rasha, the Connect Object functionality is delivered by the MCOMMAND_JOIN.

Best, Riccardo
MAXON Computer GmbH
SDK Support Team
Back to Top
RashaMatt View Drop Down
Member
Member


Joined: 2018 Jul 02
Online Status: Offline
Posts: 8
Direct Link To This Post Posted: 2018 Aug 29 at 1:29pm
Of course.  Thanks Riccardo!
Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.098 seconds.