Running Blender from the Command Line on Windows

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • In this video, we will go over the basics of working with Blender using the Windows Command Prompt.
    Documentation links:
    Command Line » Introduction
    docs.blender.org/manual/en/la...
    Command Line » Command Line Arguments
    docs.blender.org/manual/en/la...
    Command Line » Command Line Rendering
    docs.blender.org/manual/en/la...
    Launching from the Command Line » Windows
    docs.blender.org/manual/en/la...
    Python + Blender: Metaball animation created with a script:
    • Python + Blender: Meta...
    Abstract Animation Loop with Python in Blender:
    • Abstract Animation Loo...
    Running Blender from the Terminal on macOS:
    • Running Blender from t...
    Running Blender from the Terminal on Linux:
    • Running Blender from t...
    #blender #python

Komentáře • 30

  • @thedebapriyakar
    @thedebapriyakar Před rokem +3

    Man you are the best teacher ever, absolutely incredible teaching skills _/\_

  • @dreamisover9813
    @dreamisover9813 Před rokem +1

    Thanks! Good topic

  • @thedebapriyakar
    @thedebapriyakar Před rokem +2

    what a fantastic channel!

    • @CGPython
      @CGPython  Před rokem +1

      Glad you found the channel! ❤️

  • @sbmohammed7339
    @sbmohammed7339 Před rokem

    😍😍😍

  • @deividasmacavariani8684

    Wonderful just what I needed for my current task.
    I need to automate Blender Import .gltf and export .3ds with script. I notice that only 2.79 vesion can do that w/o add-ons.
    Any idea why bpy.ops.import_scene.gltf('path') didn't load me scene?

    • @CGPython
      @CGPython  Před rokem

      Are there any errors or warnings in the system console?
      Can you share your code somewhere?

  • @paweszulik3668
    @paweszulik3668 Před 11 měsíci

    As a seasoned Blender Python dev, would you normally run/have everything on your C: drive? I find it a little tricky having nothing on the C drive (neither Blender nor the projects/scripts themselves). Not undoable, but tiring.

    • @CGPython
      @CGPython  Před 11 měsíci

      Personally, I like to use the portable version of Blender and place them on my other drives. But I don't move the configuration files and user preferences, they are still under %AppData%\Blender Foundation\Blender

  • @kattimpala
    @kattimpala Před 6 měsíci

    hey cg python ! first of all your work is wonderful and has helped me learn blender's python navigation much better than other resources !!
    I'm running into an issue - I've been building a script that pulls a bunch of data files into the sequencer and I'm looking to render the contents of the sequencer, but whenever I run it via :
    python "D:\path
    ender_script.py" in the console
    it finds the script, initializes blender properly but then stops and I get a "NoneType" error, indicating that the context isn't correct. I'm having a hard time coming up with some code that properly sets the context - am I approaching this wrong ?

    • @CGPython
      @CGPython  Před 6 měsíci +1

      Have you seen this video?
      czcams.com/video/DuiFrvs10TI/video.html
      I go in to some detail about how to get the right context
      Note: the video was done before Blender 4, so see the pinned comment thread for fixes.

    • @kattimpala
      @kattimpala Před 5 měsíci

      @@CGPython i have not, thank you for the resource ! i will dive in !

  • @churnchurn9097
    @churnchurn9097 Před 3 měsíci

    Could we can use a plug in that added on command line?
    such as bloom plugin

    • @CGPython
      @CGPython  Před 2 měsíci

      So, you would want to use a plugin to apply something to a render from the command line?
      Yeah, you can do that. You might need to modify the add-on a bit to make it work in a script you can run for the command line.
      In this video I show how you are enable add-ons via code
      czcams.com/video/HnrInoBWT6Q/video.html

  • @Trendish_channel
    @Trendish_channel Před rokem

    Hi, thanks for the tutorial! Could you tell me a possible reason why every time when I run my animation rendering through the console I`m getting PNG of the same 57th keyframe (from 1 to 250)? Even if I use -a flag or -s 1 -e 250 -a args?
    I`ve just deleted Blender and cleaned the system but after a fresh new installation, I have the same issue.
    That`s the whole command line:"C:\Program Files\Blender Foundation\Blender 3.6\blender.exe" -b d:\3D\Flip_Fluid_2.blend -s 1 -e 250 -a

    • @CGPython
      @CGPython  Před rokem +1

      Thanks!
      These args look correct.
      Have you tried rendering the default scene? (save it and render it through the console)
      Does it result in the same behavior?

    • @Trendish_channel
      @Trendish_channel Před rokem

      @@CGPython Yes, I tried to create a new file and run render for it through the console but I have exactly the same picture from another file that I saw before.

  • @Sadewoo0
    @Sadewoo0 Před 3 měsíci

    is there a way to do it but in realtime ? wihtout closing/reopening blender ?

    • @CGPython
      @CGPython  Před 2 měsíci

      Running Python scripts?
      Have you seen the VSCode video
      czcams.com/video/YUytEtaVrrc/video.html&lc=UgzPN0GtmuWIQmxBjAl4AaABAg

  • @jinn_animation
    @jinn_animation Před rokem

    i'm not getting the crash report for a particular file that crash blender everytime i try open it.

    • @CGPython
      @CGPython  Před rokem

      Have you tried a different version of Blender?
      Are you running Blender with --debug-all ?

  • @Ponlets
    @Ponlets Před rokem

    this is a lie stop lying
    all my damned CMD does is say the directory doesnt exist

    • @CGPython
      @CGPython  Před rokem

      We can figure out the issue if you want.
      What command are you running that gives you that error?

    • @Ponlets
      @Ponlets Před rokem

      @@CGPython im doing the same thing you do and it doesnt work

    • @CGPython
      @CGPython  Před rokem +1

      @@Ponlets Can you share the command that you entered?
      And what Blender version are you using?
      If you enter cd "C:\Program Files\Blender Foundation\Blender 3.3\" and you have a Blender version that is not Blender 3.3 (for example, Blender 3.4 or 2.9), you will get an error that that directory doesn't exist.

    • @Ponlets
      @Ponlets Před rokem

      @@CGPython it used to be "cd" then whatever blender directory was needed
      now its different by a bit and i am flustered
      since i use multiple blender directories for scene compatibility i save in multiple locations
      currently using Blender 3.41

    • @CGPython
      @CGPython  Před rokem

      @@Ponlets I'm on 3.4.1 as well, and if you used the standard windows installer for Blender, you should be able to run `cd C:\Program Files\Blender Foundation\Blender 3.4`
      If you use a portable or experimental version of Blender, you would need to provide that path.
      What do the Blender exe Shortcut Properties say under "Target"?
      (the field that I'm copying from @ 9 minutes 35 seconds in the video czcams.com/video/JJ54OfiWlf8/video.html )
      Sorry, not sure what you mean by "now its different by a bit." :(
      If you can, record and upload an unlisted video showing the steps that you are taking. I can point out what is going wrong.