Beispiel #1
0
        def update_value(self, context):

            __update_look__(self, context)

            material = _material_utils.get_material_from_context(context)

            if material:
                _shader.set_attribute(material, self.aux_type, getattr(material.scs_props, "shader_attribute_" + self.aux_type, None))
Beispiel #2
0
def __update_shader_attribute__(self, context, attr_type):
    """Hookup function for updating shader attributes in Blender.

    :param context: Blender context
    :type context: bpy.types.Context
    :param attr_type: type of attribute to update in shader
    :type attr_type: str
    """
    __update_look__(self, context)

    material = _material_utils.get_material_from_context(context)

    if material:
        _shader.set_attribute(material, attr_type, getattr(self, "shader_attribute_" + attr_type, None))