Bases: ContextPlugin, OptionalPyblishPluginMixin
Validates No Active Viewport
Check if there is no active viewport set in the render settings.
Source code in client/ayon_max/plugins/publish/validate_render_active_viewport.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | class ValidateNoActiveViewport(pyblish.api.ContextPlugin,
OptionalPyblishPluginMixin):
"""Validates No Active Viewport
Check if there is no active viewport set in the render settings.
"""
order = pyblish.api.ValidatorOrder
families = ["maxrender"]
hosts = ["max"]
label = "No Render Active Viewport"
optional = False
actions = [RepairContextAction]
def process(self, context):
if not self.is_active(context.data):
return
if not rt.rendUseActiveView:
raise PublishValidationError(
title="No Active Render Viewport",
message=(
"The render active viewport is currently disabled "
"in the render settings. Please use the repair action "
"to activate it."
),
description=(
"## Render Active Render Viewport\n"
"The render active viewport is currently "
"disabled in the render settings.\n\n"
"We need to enable the render active viewport "
"to ensure the correct render viewport is used.\n\n"
"You can use the repair action to activate it."
)
)
@classmethod
def repair(cls, context):
rt.rendUseActiveView = True
|