Jump to content

IoAro

Limited Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by IoAro

  1. Thank you @jbatista! I was thinking of getting around the problem in a way that is not very clean but hopefully will work. If there is the null parent object selected, just select the child instance by clicking the down arrow in the keyboard and then run the unparent command. Would it be possible in Python to execute the down arrow in the keyboard? With a callcommand like for the unparent command or something like that. And then would it be possible to activate Python code (put in a tag or Xpresso node) through a userdata command? Thanks again and have a great evening!
  2. Thank you @srek and @jbatista! Your answers are interesting, but I would not be able to do exactly what I want. Or rather, I actually really need to take an instance out of the hierarchy, but it should only come out of the hierarchy through the activation of a userdata button. I searched around a bit and found a script to put in a Python tag that almost does what I want: by pressing an "Unparent" button attached to the Python tag, the instance exits the hierarchy. The problem is that the script uses a callcommand which is not the best choice, plus it is triggered by a button that is in the userdata of the instance itself (I would like the button to be in the null parent) and finally that it is triggered by a button instead of a boolean as I would like. Would you be able to suggest solutions to fix this? Is it possible to "transfer" the button from the instance to the null parent? And is it possible to have the script triggered by a boolean tick instead of a button as it is now? Attached is the scene with the tag I am talking about. In any case I thank you and wish you a good day! Unparent.c4d
  3. Hello, I would like to extract from the hierarchy (unparent) a specific object with a boolean userdata, is it possible?
  4. Thanks @jed but doesn't work for me.
  5. Hi, I created a simple script to open video tutorials by calling them directly from the app. The script works, but I would like to indicate the relative address instead of the absolute one. For example instead of "C:\Program Files\MAXON\CINEMA 4D R18\plugins\Video\Thrausi 1.mp4" I would like something like "folder plugin\Video\Thrausi 1.mp4". This is a complete example scripts: import c4d from os import path as p from c4d import storage as st from c4d import gui def main(): st.ShowInFinder("C:\Program Files\MAXON\CINEMA 4D R18\plugins\Video\Thrausi 1.mp4", True) if __name__=='__main__': main() Can someone help me? Thanks
×
×
  • Create New...