Select a tool. And change its container.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 26/12/2006 at 15:20, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.6 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
How can I select some tool?
And how to get its container?
For example I want to make a command that select the Knife tool and set its Mode to "plane" and Plane to "X-Y".

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 26/12/2006 at 15:59, xxxxxxxx wrote:

Sounds like you'll need to use FindPlugin(ID, C4DPL_TOOL) and then get the BaseContainer using GetDataInstance(), for instance. :)

The hard part is knowing the ID and getting the specific Attribute Manager/Active Tool settings. These should be stored somewhere in the Resource folder (_api or res or modules possibly).

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 01:40, xxxxxxxx wrote:

Thanks a lot !!!!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 01:51, xxxxxxxx wrote:

hmmm ...
And another question...
How can I make some tool active ( display its parameters in AM ) ?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 06:20, xxxxxxxx wrote:

When the tool is selected, it´s descriptions get display in the AM automatically! Reshowing it, is simply reactivating the tool.

Working on a tool for your edge slide pluggy? ;)

Keep it up.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 07:54, xxxxxxxx wrote:

"When the tool is selected, it´s descriptions get display in the AM automatically"
But how to select it?  By C++.
...
:) Actually I put aside MultiSlide, and make another plug.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 08:00, xxxxxxxx wrote:

The user selects it. :-) Or do you need this for something different? Maybe it would be better to explain why you want to select a tool yourself?

Anyway, select a tool by this: doc->SetAction(PLUGINID_OF_TOOLPLUGIN);

If this doesn´t work, try a GeSyncMessage(EVMSG_TOOLCHANGED); //or another message type

So, what plug are you workin on?

Hope that helps
Samir

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 08:19, xxxxxxxx wrote:

It is for some commands I need to have, and I want to write it on c++ not on COFFEE :)
And for one tool ... it is long to explain, you will see it ;)
Thank you very much ! It is just I looked for !

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/12/2006 at 08:34, xxxxxxxx wrote:

xarashoa :)