Results 1 to 5 of 5
  1. #1

    How to apply an addon to the last selected object ?

    Hi, trying to adapt this feature for faster usage

    use it with addon ice tools
    what i did get Screenshot_1140.png. How to apply addon to the last selected object ?

  2. #2
    Screenshot_1142.pngScreenshot_1143.png with the help of this script you can do such things quickly, whith one click

  3. #3

  4. #4

  5. #5
    Join Date
    Nov 2016

    Just wondering if you've come across the bpy.context.selected_objects attribute? It is a python list of all currently selected objects in the scene. It doesn't work the way you want it too if I am reading you correctly, but it can be the starting point for what you want to do. I have done something similar in an addon I am working on.

    The basic elements of the solution to do this are:

    1. Either use a handler or modal operator to run a script when the user changes their selection of objects in any way.
    2. The script its self contains a collection of what has been selected in the order it has been selected.

    1. you can use a modal operator that runs whenever there is a mouse event, check to see if there is a change to the bpy.context.selected collection

    2. the code to check would need to store what has been selected somwhere, perhaps in a property or you could create a variable/property inside the operator its self. You need to do this since the collection is going to need to persist throughout blender's runtime. Normally a scripts state only lasts for the time its being executed and then its gone.

    That is the short version, let me know if this sounds like what you want and I can perhaps help you get it working?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts