I'm a Blender beginner just trying to find my way around, with the end goal of fully automating a number of rather pedestrian 3D manipulation tasks. While experimenting with various Python commands I encountered the following situation:
- I use the UI to change the scene unit system from the default Blender units to Metric/millimeters (I can also do this in Python). But now the grid units in the 3D view are too small, so they need to be adjusted as well.
- I go to the Display section of the Properties screen (window?) and I set the Scale to 0.01, which would give me a decently visible grid.
- The Python code shown in the Info area once I execute this command is: bpy.context.space_data.grid_scale = 0.01
- But when trying to run this same command in the Python console I find out that the SpaceConsole object (.space_data) does not have any attribute named grid_scale. That is also confirmed by the auto-completion feature, and by the Python API documentation that comes with version 2.79 of Blender, which is what I'm running.
A couple of questions related to this case, and the general exercise of trying to familiarize myself with the Blender environment, which so far presents a unexpectedly steep learning curve when it comes to "getting both feet off the ground" (in this case maneuvering around the UI):
- How far can I trust the Python commands shown in the Info area while I manipulate objects manually in the 3D view? (This particular one obviously can't be trusted, since it doesn't exist or it's been deprecated.)
- Is there any other way to use Python to set the grid scale after I change the scene units (or any time I want to)?
- If there is no other way (anymore), then what workarounds exist to achieve this modest goal? (Saving a file with all the correct scene and grid units and loading that instead, etc.)
I apologize in advance for wasting someone's time with newbie questions, but in this case this discrepancy seems to point to a shortcoming in the product, which I would like to confirm (and I am actually reading the _ manual :))