Projects: Add texture node type when creating a new project.
This commit is contained in:
@@ -13,6 +13,7 @@ from application.utils.authorization import user_has_role, check_permissions, re
|
|||||||
from manage_extra.node_types.asset import node_type_asset
|
from manage_extra.node_types.asset import node_type_asset
|
||||||
from manage_extra.node_types.comment import node_type_comment
|
from manage_extra.node_types.comment import node_type_comment
|
||||||
from manage_extra.node_types.group import node_type_group
|
from manage_extra.node_types.group import node_type_group
|
||||||
|
from manage_extra.node_types.texture import node_type_texture
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
blueprint = Blueprint('projects', __name__)
|
blueprint = Blueprint('projects', __name__)
|
||||||
@@ -159,7 +160,9 @@ def after_inserting_project(project, db_user):
|
|||||||
project['node_types'] = [
|
project['node_types'] = [
|
||||||
with_permissions(node_type_group),
|
with_permissions(node_type_group),
|
||||||
with_permissions(node_type_asset),
|
with_permissions(node_type_asset),
|
||||||
with_permissions(node_type_comment)]
|
with_permissions(node_type_comment),
|
||||||
|
with_permissions(node_type_texture),
|
||||||
|
]
|
||||||
|
|
||||||
# Allow admin users to use whatever url they want.
|
# Allow admin users to use whatever url they want.
|
||||||
if not is_admin or not project.get('url'):
|
if not is_admin or not project.get('url'):
|
||||||
|
@@ -33,7 +33,7 @@ node_type_asset = {
|
|||||||
'type': 'dict',
|
'type': 'dict',
|
||||||
'schema': {
|
'schema': {
|
||||||
'field': {'type': 'string'},
|
'field': {'type': 'string'},
|
||||||
'files' : {
|
'files': {
|
||||||
'type': 'list',
|
'type': 'list',
|
||||||
'schema': {
|
'schema': {
|
||||||
'type': 'dict',
|
'type': 'dict',
|
||||||
|
@@ -19,7 +19,7 @@ node_type_texture = {
|
|||||||
'order': {'type': 'integer'},
|
'order': {'type': 'integer'},
|
||||||
# We point to the file variations (and use it to extract any relevant
|
# We point to the file variations (and use it to extract any relevant
|
||||||
# variation useful for our scope).
|
# variation useful for our scope).
|
||||||
'files' : {
|
'files': {
|
||||||
'type': 'list',
|
'type': 'list',
|
||||||
'schema': {
|
'schema': {
|
||||||
'type': 'dict',
|
'type': 'dict',
|
||||||
|
Reference in New Issue
Block a user