Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/nodeitems_builtins.py
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | class CompositorNodeCategory(SortedNodeCategory): | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.space_data.tree_type == 'CompositorNodeTree') | return (context.space_data.tree_type == 'CompositorNodeTree') | ||||
| class ShaderNewNodeCategory(SortedNodeCategory): | class ShaderNewNodeCategory(SortedNodeCategory): | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.space_data.tree_type == 'ShaderNodeTree' and | return (context.space_data.tree_type == 'ShaderNodeTree' and | ||||
| context.scene.render.use_shading_nodes) | context.scene.view_render.use_shading_nodes or | ||||
| context.view_render.use_shading_nodes) | |||||
| class ShaderOldNodeCategory(SortedNodeCategory): | class ShaderOldNodeCategory(SortedNodeCategory): | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.space_data.tree_type == 'ShaderNodeTree' and | return (context.space_data.tree_type == 'ShaderNodeTree' and | ||||
| not context.scene.render.use_shading_nodes) | not context.scene.view_render.use_shading_nodes and | ||||
| not context.view_render.use_shading_nodes) | |||||
| class TextureNodeCategory(SortedNodeCategory): | class TextureNodeCategory(SortedNodeCategory): | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.space_data.tree_type == 'TextureNodeTree' | return context.space_data.tree_type == 'TextureNodeTree' | ||||
| ▲ Show 20 Lines • Show All 458 Lines • Show Last 20 Lines | |||||