Blender Crawl: Collected Studio feedback #52

Closed
opened 2023-05-19 12:13:52 +02:00 by Andy Goralczyk · 3 comments
Member

This is a thread for the studio feedback for blender_crawl.

  1. The docs for the option 'ask' is a bit confusing: it says If provided there will be no confirmation prompt before running script on .blend files. but it seems to do the opposite, which is ask for confirmation.

  2. blender_crawl should handle saving of .blend files for custom scripts. otherwise it needs to be included in each script. which brings me to the next...

  3. I just made this simple script to print all object names and save:

import bpy

for ob in bpy.data.objects:
    print(ob.name)

bpy.ops.wm.save_mainfile()

I noticed that it's using the default settings for blender, which saves backup .blend1 files whenever you save the main file. That means that you could potentially pollute directories with a whole bunch of .blend1's when you're crawling... I think this option should be disabled so we dont have to include bpy.context.preferences.filepaths.save_version = 0 in the scripts every time.

  1. The docs should mention that su or sudo is needed for the install. At least it should say that the right permissions should be needed to modify system files...
This is a thread for the studio feedback for blender_crawl. 1) The docs for the option 'ask' is a bit confusing: it says If provided there will be no confirmation prompt before running script on .blend files. but it seems to do the opposite, which is ask for confirmation. 2) blender_crawl should handle saving of .blend files for custom scripts. otherwise it needs to be included in each script. which brings me to the next... 4) I just made this simple script to print all object names and save: ``` import bpy for ob in bpy.data.objects: print(ob.name) bpy.ops.wm.save_mainfile() ``` I noticed that it's using the default settings for blender, which saves backup .blend1 files whenever you save the main file. That means that you could potentially pollute directories with a whole bunch of .blend1's when you're crawling... I think this option should be disabled so we dont have to include `bpy.context.preferences.filepaths.save_version = 0` in the scripts every time. 5) The docs should mention that su or sudo is needed for the install. At least it should say that the right permissions should be needed to modify system files...
Simon Thommes added the
Kind
Studio Request
label 2023-05-19 12:15:06 +02:00
Member

Talked with Andy a bit as well and agree with his feedback.

About this:

  1. blender_crawl should handle saving of .blend files for custom scripts. otherwise it needs to be included in each script. which brings me to the next...

I do think it can be good to be able to not save but just crawl though files to retrieve data, so it should probably be a command line option. It should probably work with saving enabled by default though.

Talked with Andy a bit as well and agree with his feedback. About this: > 2) blender_crawl should handle saving of .blend files for custom scripts. otherwise it needs to be included in each script. which brings me to the next... I do think it can be good to be able to not save but just crawl though files to retrieve data, so it should probably be a command line option. It should probably work with saving enabled by default though.
Andy Goralczyk changed title from [Blender Crawl] Collected Studio feedback to [Blender_Crawl] Collected Studio feedback 2023-05-19 12:29:18 +02:00
Member

Changes

  • blender_crawl will handle saving by default (without creating .blend1)
  • Optionally skip saving with a commandline flag

Updates to README

  • Explain new Save & Skip saving features
  • Add sudo or su to install instructions
  • Fix the description for the --ask
### Changes - [x] blender_crawl will handle saving by default (without creating .blend1) - [x] Optionally skip saving with a commandline flag ### Updates to README - [x] Explain new Save & Skip saving features - [x] Add `sudo` or `su` to install instructions - [x] Fix the description for the `--ask`
Nick Alberelli changed title from [Blender_Crawl] Collected Studio feedback to Blender_Crawl: Collected Studio feedback 2023-05-19 14:58:50 +02:00
Nick Alberelli changed title from Blender_Crawl: Collected Studio feedback to Blender Crawl: Collected Studio feedback 2023-05-19 14:58:58 +02:00
Nick Alberelli added reference fix/blender-crawl-improvements 2023-05-19 15:19:42 +02:00
Member

@eyecandy @SimonThommes

I have made a new branch with all the changes we have discussed above, please take a look at this new readme 32f1231650/scripts/blender-crawl/README.md and let me know if you have any futher feedback prior to merging.

You can read-thru the PR here: studio/blender-studio-pipeline#53

The important changes are:

  • It will save by default now and there is a --nosave flag to skip saving
  • Save Versions are automatically set to 0 and user settings are restored after tool is finished running
  • We will not save if no scripts are provided as arguments the tool only saves after script execution. Running blender_crawl ./ still just prints the names of the .blends in the current directory
  • README has been fixed up to explain the above features and fix --ask and improve installation instructions
@eyecandy @SimonThommes I have made a new branch with all the changes we have discussed above, please take a look at this new readme https://projects.blender.org/studio/blender-studio-pipeline/src/commit/32f12316505701f3c966424837be6363500955f9/scripts/blender-crawl/README.md and let me know if you have any futher feedback prior to merging. You can read-thru the PR here: https://projects.blender.org/studio/blender-studio-pipeline/pulls/53 The important changes are: - It will save by default now and there is a `--nosave` flag to skip saving - Save Versions are automatically set to 0 and user settings are restored after tool is finished running - We will not save if no scripts are provided as arguments the tool only saves after script execution. Running `blender_crawl ./` still just prints the names of the .blends in the current directory - README has been fixed up to explain the above features and fix `--ask` and improve installation instructions
Nick Alberelli added the
Kind
Enhancement
label 2023-05-19 17:22:15 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: studio/blender-studio-tools#52
No description provided.