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

RIGID_BODY_CLEAR_INITIAL_STATE

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

Joined: 2015 Mar 27
Location: Tokyo
Online Status: Offline
Posts: 5
Direct Link To This Post Topic: RIGID_BODY_CLEAR_INITIAL_STATE
    Posted: 2018 Mar 08 at 9:46pm
Hello all,

I try python CallButton, but it dosen't work.

c4d.CallButton(tag, c4d.RIGID_BODY_CLEAR_INITIAL_STATE)

I can't find "RIGID_BODY_CLEAR_INITIAL_STATE" CallCommand number.

Do you know that?




Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Mar 09 at 3:07am
Hello Nob,

Actually CallButton is the right way to go. And it should work (and it's working fine here).
So may I ask you a few more information about where you execute it, maybe tag is not define or is not the right one?

CallCommand is more used to use tool like reversenormal or execute a cut for example, so you can't use it in this context.

Moreover just for your personal knowledge all constant you get (from the Console Log or either by drag and drop a parameter on the console or the script manager) are actually Integer.
So if in the console you write c4d.RIGID_BODY_CLEAR_INITIAL_STATE (always add c4d, sicne constants are stored in the c4d module) it will print you the actual id of this action/button/parameter.

Please do not hesitate if you feel lost, or you don't understand something.

Cheers,
Maxime
MAXON
SDK Specialist
Back to Top
nob View Drop Down
Member
Member
Avatar

Joined: 2015 Mar 27
Location: Tokyo
Online Status: Offline
Posts: 5
Direct Link To This Post Posted: 2018 Mar 09 at 8:11pm
Thanks for the reply.

I am making ToolData Pugin. It is to paint the object with a mouse. Paint uses dynamics.
tag [c4d.RIGID_BODY_INITIAL_LINEAR_VELOCITY] is used in def MouseInput.
Can c4d.RIGID_BODY_INITIAL_LINEAR_VELOCITY be used with ToolData? Or can you use def MouseInput?
Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Mar 12 at 2:53am
Hi Nob,

I'm not sure your last question is related to the first one.
Does your initial question is completely resolved?

If yes, please feel free to open a new thread for your last question.
Owever make sure to share as most informations as you can, it will really help us to help you :)

Cheers,
Maxime
MAXON
SDK Specialist
Back to Top
nob View Drop Down
Member
Member
Avatar

Joined: 2015 Mar 27
Location: Tokyo
Online Status: Offline
Posts: 5
Direct Link To This Post Posted: 2018 Mar 13 at 7:43am
Sorry, it was a different question.
Is CallButton possible in the ToolData plugin class?

def MouseInput(self, doc, data, bd, win, msg):
c4d.CallButton(tag, c4d.RIGID_BODY_CLEAR_INITIAL_STATE)

Edited by nob - 2018 Mar 13 at 7:47am
Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Mar 14 at 3:56am
Hi Nob,

I would like to ask you at least a day in order to gather some more informations.

Thanks :)
MAXON
SDK Specialist
Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Mar 15 at 3:15am
Hi Nob, 

after some discussions it's completely fine to use CallButton from MouseInput function of a ToolData.
So if it's not working as you expected or you encounter any issues please feel free to ask.

Cheers, 
Maxime
MAXON
SDK Specialist
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.094 seconds.