Last active
April 10, 2018 21:15
-
-
Save gordielachance/ba32a3087f8d327bfdeb9d0ea7fb4935 to your computer and use it in GitHub Desktop.
Blender script that reduce your section of objects to nth objects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
nthObjectSelector by gordielachance | |
This will reduce your current selection of object to nth objects. | |
https://gist.github.com/gordielachance/ba32a3087f8d327bfdeb9d0ea7fb4935 | |
""" | |
import bpy | |
#SETUP | |
nth = 3 #Specify your nth value here ! | |
#list of selected objects | |
list_all = bpy.context.selected_objects | |
#start by unselecting everything | |
for obj in list_all: | |
obj.select = False | |
#now only select nth | |
list_reduced = list_all[::nth] | |
for obj in list_reduced: | |
obj.select = True | |
#debug | |
print("nthObjectSelector ({}) : selected {} out {} objects".format(nth,len(list_reduced), len(list_all))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment