Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search

Tool for polygon objects

Author
Message
  Topic Search Topic Search
Miro View Drop Down
Member
Member
Avatar

Joined: 2015 Feb 11
Online Status: Offline
Posts: 35
Direct Link To This Post Topic: Tool for polygon objects
    Posted: 2017 May 09 at 7:02am

User Information:

Cinema 4D Version:   R18 
Platform:   Windows  ; Mac  ;  Mac OSX  ; 
Language(s):     C++  ;   

---------

Hello,
I'd like to create plugin tool for modifying editable polygon objects. It should change mesh of existing object in similar way to Extrude or Line Cut mesh tools. I cannot find anything similar to this in Cinema official samples.

Can you give me some general guidelines how to do that correctly?

I already tried something like this:
 - class derived from ToolData (is it the right base class for such tool? )
 - in MouseInput function I modified selected object (accessing mesh of safely casted PolygonObject - not sure if this is correct )

It does some strange things, like object is sometimes deselected or mesh disappears completely.

Thank you.
 
Back to Top
ScottA View Drop Down
Member
Member


Joined: 2011 Jan 07
Online Status: Offline
Posts: 2288
Direct Link To This Post Posted: 2017 May 09 at 10:09am
Hi,
ToolData is the older version of tool plugins that does not support resources.
Most of the time DescriptionToolData is a better choice.

I have an example tool plugin on my site called "Tool Plugin" that shows how to highlight, select, or delete polygons using the LMB.
There are some notes in the code for different ways to use the SendModelingCommand options. So instead of using delete, you can change it to extrude the selected polygon.

https://sites.google.com/site/scottayersmedia/plugins

-ScottA
Back to Top
Miro View Drop Down
Member
Member
Avatar

Joined: 2015 Feb 11
Online Status: Offline
Posts: 35
Direct Link To This Post Posted: 2017 May 09 at 11:51pm
Thank you! I expected exactly something like this in Maxon SDK.
Back to Top
ScottA View Drop Down
Member
Member


Joined: 2011 Jan 07
Online Status: Offline
Posts: 2288
Direct Link To This Post Posted: 2017 May 10 at 6:35am
Glad it helped.
That's why I made that website. To fill in the missing pieces.

-ScottA
Back to Top
S_Bach View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2011 Jun 27
Online Status: Offline
Posts: 1379
Direct Link To This Post Posted: 2017 May 12 at 3:34am
Hello,

you can also find various examples on ToolData plugins on GitHub.

best wishes,
Sebastian
SDK Support Engineer
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.109 seconds.