Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Dans ton Tool
- c4d.SpecialEventAdd(const.PLUGIN_ID, p1=1)
- # Dans ton UI
- def CoreMessage(self, id, msg):
- if id == PLUGIN_ID:
- P1MSG_UN = msg.GetVoid(c4d.BFM_CORE_PAR1)
- pythonapi.PyCObject_AsVoidPtr.restype = c_void_p
- pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object]
- P1MSG_EN = pythonapi.PyCObject_AsVoidPtr(P1MSG_UN)
- #1 = add pose
- if P1MSG_EN == 1:
- #on recup les infos du dialog
- pose_id = self.pose.dialog_pose.pose_id
- group_id = self.pose.dialog_pose.group_id
- pose_name = self.pose.dialog_pose.pose_name
- is_animation = self.pose.dialog_pose.animation
- start_anim = self.pose.dialog_pose.start
- end_anim = self.pose.dialog_pose.end
- selection = self.pose.dialog_pose.selection
- self.pose.create_pose(group_id, pose_id, pose_name, is_animation, start_anim, end_anim,selection)
- #On refresh la liste des poses
- self.ua.refresh_group_tab(True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement