Post #2481: : post_02483
🏷️ Tags
python-scripting intermediate solved
⚙️ Related PME Features
- Python Scripting
- override_context() function
- UILayout customization
💬 Content
RaphaelBarros:
Is there any documentation or way I should go about find which custom code I should use?
RaphaelBarros:
I’ve got a lot of individual parts I need to expose and I’d rather not flood this thread with my questions, hahaha.
Imo “Edit Source” is the best documentation and a way to learn how to draw custom layouts.
And of course this page.
RaphaelBarros:
While I’m at it, do you know if there’s any way for me to save an texture image I baked from the 3D View? I tried to following code but it didn’t work (probably due to the context).
PME has override_context() function which tries to find and use required area in the current screen/workspace. Try this code:
bpy.ops.image.save_as(override_context('IMAGE_EDITOR'), save_as_render=False, filepath="//texture.png", relative_path=True, show_multiview=False, use_multiview=False)
❤️ 1 likes