Added a group_hdri node type.

This node type serves the same purpose for hdri as the group_texture
serves for the texture nodes.
This commit is contained in:
Sybren A. Stüvel 2016-07-20 15:22:24 +02:00
parent 6d68753b1b
commit 7880fb6968
4 changed files with 25 additions and 5 deletions

View File

@ -101,7 +101,7 @@ def has_texture_node(proj, return_hdri=True):
# See which types of nodes we support. # See which types of nodes we support.
node_types = ['group_texture'] node_types = ['group_texture']
if return_hdri: if return_hdri:
node_types.append('hdri') node_types.append('group_hdri')
count = nodes_collection.count( count = nodes_collection.count(
{'node_type': {'$in': node_types}, {'node_type': {'$in': node_types},

View File

@ -0,0 +1,22 @@
node_type_group_hdri = {
'name': 'group_hdri',
'description': 'Group for HDRi node type',
'parent': ['group_hdri', 'project'],
'dyn_schema': {
# Used for sorting within the context of a group
'order': {
'type': 'integer'
},
'status': {
'type': 'string',
'allowed': [
'published',
'pending',
],
}
},
'form_schema': {
'status': {},
'order': {}
}
}

View File

@ -5,9 +5,7 @@ node_type_hdri = {
# bucket (https://cloud.google.com/storage/docs/cross-origin) # bucket (https://cloud.google.com/storage/docs/cross-origin)
'name': 'hdri', 'name': 'hdri',
'description': 'HDR Image', 'description': 'HDR Image',
# This data type does not have parent limitations (can be child 'parent': ['group_hdri'],
# of any node). An empty parent declaration is required.
'parent': ['group', ],
'dyn_schema': { 'dyn_schema': {
'status': { 'status': {
'type': 'string', 'type': 'string',

View File

@ -442,7 +442,7 @@ class TextureLibraryTest(AbstractHomeProjectTest):
self.create_node({'description': '', self.create_node({'description': '',
'project': self.hdri_proj_id, 'project': self.hdri_proj_id,
'node_type': 'hdri', 'node_type': 'group_hdri',
'user': user_id, 'user': user_id,
'properties': {'status': 'published', 'properties': {'status': 'published',
'tags': [], 'tags': [],