ignore object with leading dot
1.0.2 - added: GP object with name starting with `.` are ignored from "all objects" operation (renaming, numbering, sending to render scene) - temporarily, layer named `note` (case insensitive) are ignored as well. This should be removed in later version to keep only dot exculsion rule.
This commit is contained in:
@@ -10,6 +10,23 @@ from time import time
|
||||
import json
|
||||
|
||||
|
||||
### -- rules
|
||||
|
||||
def is_valid_name(name):
|
||||
'''return True if name correspond to a valid object
|
||||
Don't start with a dot '.'
|
||||
Is not "note"
|
||||
'''
|
||||
|
||||
if name.startswith('.'):
|
||||
return False
|
||||
|
||||
## FIXME: /!\ "note" as an exclude word is not good practice, temporary fix
|
||||
if name.lower() == 'note':
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
### -- node basic
|
||||
|
||||
def create_node(type, tree=None, **kargs):
|
||||
|
||||
Reference in New Issue
Block a user