tobspr/RenderPipeline

View on GitHub
rpcore/render_pipeline.py

Summary

Maintainability
D
2 days
Test Coverage

File render_pipeline.py has 582 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""

RenderPipeline

Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>
Severity: Major
Found in rpcore/render_pipeline.py - About 1 day to fix

    RenderPipeline has 37 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class RenderPipeline(RPObject):
    
        """ This is the main render pipeline class, it combines all components of
        the pipeline to form a working system. It does not do much work itself, but
        instead setups all the managers and systems to be able to do their work. """
    Severity: Minor
    Found in rpcore/render_pipeline.py - About 4 hrs to fix

      Function prepare_scene has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
      Open

          def prepare_scene(self, scene):
              """ Prepares a given scene, by converting panda lights to render pipeline
              lights. This also converts all empties with names starting with 'ENVPROBE'
              to environment probes. Conversion of blender to render pipeline lights
              is done by scaling their intensity by 100 to match lumens.
      Severity: Minor
      Found in rpcore/render_pipeline.py - About 4 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _internal_set_effect has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def _internal_set_effect(self, nodepath, effect_src, options=None, sort=30):
              """ Sets an effect to the given object, using the specified options.
              Check out the effect documentation for more information about possible
              options and configurations. The object should be a nodepath, and the
              effect will be applied to that nodepath and all nodepaths below whose
      Severity: Minor
      Found in rpcore/render_pipeline.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _init_showbase has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          def _init_showbase(self, base):
              """ Inits the the given showbase object. This is part of an alternative
              method of initializing the showbase. In case base is None, a new
              ShowBase instance will be created and initialized. Otherwise base() is
              expected to either be an uninitialized ShowBase instance, or an
      Severity: Minor
      Found in rpcore/render_pipeline.py - About 45 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Avoid deeply nested control flow statements.
      Open

                              if not tristrips_warning_emitted:
                                  self.warn("At least one GeomNode (", geom_node.get_name(), "and possible more..) contains tristrips.")
                                  self.warn("Due to a NVIDIA Driver bug, we have to convert them to triangles now.")
                                  self.warn("Consider exporting your models with the Bam Exporter to avoid this.")
                                  tristrips_warning_emitted = True
      Severity: Major
      Found in rpcore/render_pipeline.py - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status