Skip to content

Commit

Permalink
Show: TempoVis: made to accept any iterable as list of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepSOIC authored and yorikvanhavre committed Mar 15, 2017
1 parent 7054346 commit dc227dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Show/TempoVis.py
Expand Up @@ -63,7 +63,7 @@ def modifyVPProperty(self, doc_obj_or_list, prop_name, new_value):
TempoVis deletion, or call to restore().'''

if App.GuiUp:
if type(doc_obj_or_list) is not list:
if not hasattr(doc_obj_or_list, '__iter__'):
doc_obj_or_list = [doc_obj_or_list]
for doc_obj in doc_obj_or_list:
if not hasattr(doc_obj.ViewObject, prop_name):
Expand Down Expand Up @@ -216,7 +216,7 @@ def setUnpickable(self, doc_obj_or_list, actual_pick_style = 2): #2 is coin.SoPi
tempovis. '''

if App.GuiUp:
if type(doc_obj_or_list) is not list:
if not hasattr(doc_obj_or_list, '__iter__'):
doc_obj_or_list = [doc_obj_or_list]
for doc_obj in doc_obj_or_list:
if doc_obj.Document is not self.document: #ignore objects from other documents
Expand Down

0 comments on commit dc227dc

Please sign in to comment.