forked from bartvdbraak/blender
53d59af364
Example, imagine an object Cube in collections 1 and 2 where both collections are nested to A. Now we set a "color" property as follow: ``` Scene -> GREEN -- A -> RED ↳ 1 -> BLUE ↳ 2 -> - ``` In this case the object will be RED, because of A↳ 2. Now if we have: ``` Scene -> GREEN -- A -> RED ↳ 1 -> - ↳ 2 -> PINK 1 -> - -- The object will be PINK because of A↳ 2. Note that the (top level) collection 1 doesn't influence the object color because there are no overrides on it. The scene render settings (GREEN in this case) are only used as fallback if an override is not set at all.
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
# ############################################################
|
|
# Importing - Same For All Render Layer Tests
|
|
# ############################################################
|
|
|
|
import unittest
|
|
import os
|
|
import sys
|
|
|
|
from render_layer_common import *
|
|
|
|
|
|
# ############################################################
|
|
# Testing
|
|
# ############################################################
|
|
|
|
class UnitTesting(RenderLayerTesting):
|
|
def test_render_settings(self):
|
|
"""
|
|
See if the depsgraph evaluation is correct
|
|
"""
|
|
clay = Clay(extra_kid_layer=True)
|
|
self.assertEqual(clay.get('object', 'matcap_icon'), '01')
|
|
|
|
clay.set('kid', 'matcap_icon', '02')
|
|
clay.set('extra', 'matcap_icon', '04')
|
|
self.assertEqual(clay.get('object', 'matcap_icon'), '04')
|
|
|
|
|
|
# ############################################################
|
|
# Main - Same For All Render Layer Tests
|
|
# ############################################################
|
|
|
|
if __name__ == '__main__':
|
|
import sys
|
|
|
|
extra_arguments = sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else []
|
|
sys.argv = [__file__] + (sys.argv[sys.argv.index("--") + 2:] if "--" in sys.argv else [])
|
|
|
|
UnitTesting._extra_arguments = extra_arguments
|
|
unittest.main()
|