Advertisement
gr4ph0s

Untitled

Dec 7th, 2017
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.10 KB | None | 0 0
  1.  # Dans ton Tool
  2. c4d.SpecialEventAdd(const.PLUGIN_ID, p1=1)
  3.  
  4. # Dans ton UI
  5.  def CoreMessage(self, id, msg):
  6.         if id == PLUGIN_ID:
  7.             P1MSG_UN = msg.GetVoid(c4d.BFM_CORE_PAR1)
  8.  
  9.             pythonapi.PyCObject_AsVoidPtr.restype = c_void_p
  10.             pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object]
  11.             P1MSG_EN = pythonapi.PyCObject_AsVoidPtr(P1MSG_UN)
  12.  
  13.             #1 = add pose
  14.             if P1MSG_EN == 1:
  15.                 #on recup les infos du dialog
  16.                 pose_id = self.pose.dialog_pose.pose_id
  17.                 group_id = self.pose.dialog_pose.group_id
  18.                 pose_name = self.pose.dialog_pose.pose_name
  19.                 is_animation = self.pose.dialog_pose.animation
  20.                 start_anim = self.pose.dialog_pose.start
  21.                 end_anim = self.pose.dialog_pose.end
  22.                 selection = self.pose.dialog_pose.selection
  23.  
  24.                 self.pose.create_pose(group_id, pose_id, pose_name, is_animation, start_anim, end_anim,selection)
  25.  
  26.                 #On refresh la liste des poses
  27.                 self.ua.refresh_group_tab(True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement