src/main.py
def run(self, script: str, python_args: Iterable, **kwargs) -> str:
        """Run a script in Blender. You only need to
        place a script path in the method to use blender.
        """
        if (error := self._dry_run(**kwargs, python_args=python_args)):
            raise ValueError(error)
        
        if ".py" not in script:
            script = script + ".py"
        
        gui = "-b" if kwargs.get("headless", True) else ""
        runtime = "-P" if kwargs.get("python", True) else ""
        audio = "-noaudio" if not kwargs.get("audio", False) else ""
        python_args = ' '.join(python_args)
        
        prod = self.call(
            f"{self.app} {audio} {gui} {runtime} {script} -- {python_args}"
        )
        
        return prod
Run a script in Blender. You only need to
        place a script path in the method to use blender.
        
Run a script in Blender. You only need to
place a script path in the method to use blender.
Run a script in Blender . You only need to place a script path in the method to use blender .
def run(self, script: str, python_args: Iterable, **kwargs) -> str:
        if (error := self._dry_run(**kwargs, python_args=python_args)):
            raise ValueError(error)
        if ".py" not in script:
            script = script + ".py"
        gui = "-b" if kwargs.get("headless", True) else ""
        runtime = "-P" if kwargs.get("python", True) else ""
        audio = "-noaudio" if not kwargs.get("audio", False) else ""
        python_args = ' '.join(python_args)
        prod = self.call(
            f"{self.app} {audio} {gui} {runtime} {script} -- {python_args}"
        )
        return prod
def run ( self , script : str , python_args : Iterable , ** kwargs ) -> str : if ( error := self . _dry_run ( ** kwargs , python_args = python_args ) ) : raise ValueError ( error ) if ".py" not in script : script = script + ".py" gui = "-b" if kwargs . get ( "headless" , True ) else "" runtime = "-P" if kwargs . get ( "python" , True ) else "" audio = "-noaudio" if not kwargs . get ( "audio" , False ) else "" python_args = ' ' . join ( python_args ) prod = self . call ( f"{self.app} {audio} {gui} {runtime} {script} -- {python_args}" ) return prod
Run a script in Blender.
Run a script in Blender .
"""Run a script in Blender. You only need to
        place a script path in the method to use blender.
        """
self
script
str
python_args
Iterable