Commit Graph

10 Commits

Author SHA1 Message Date
Campbell Barton
949dfbfaa8 Cleanup: Python script formatting
- Double quotes for strings.
- Trailing commas when wrapped lines.
2024-06-06 11:26:28 +10:00
Nika Kutsniashvili
1d894aa1a7 Add Convert Image Empty to Mesh Plane operator
Since import images as mesh planes operator was added recently in core
Blender, it is now easy to also support converting image empties to mesh
planes by reusing the same code.

This results in a fast workflow where you can use Blender's drag & drop
& align feature for reference images, and quickly turn them into meshes
without registering second file handler and clicking anything before
import is finished.

Ref !122546
2024-06-06 11:15:47 +10:00
Jeroen Bakker
c7807a425a EEVEE: Alias/remove legacy RNA material attributes
- `bpy.types.Material.blend_method` aliases `bpy.types.Material.surface_render_method`.
  'Opaque' and 'Alpha Clip' maps to deferred.
- Renamed `show_transparent_back` to `use_transparency_overlap`
- Renamed `use_screen_refraction` to `use_raytrace_refraction`
- Deprecate `use_sss_translucency` and `use_sss_translucency`

Related to: #113976

**NOTE**
The light probe changes will be done in a different patch.
Both patches should land just before we remove EEVEE Legacy
from the code-base.

Pull Request: https://projects.blender.org/blender/blender/pulls/122297
2024-06-04 14:48:40 +02:00
Damien Picard
4b4ae72837 Import Images as Planes: improve option panels
- Layout changes
  - Use panels instead of boxes resulting in a more compact UI,
    more suitable to the drag-and-drop UI.
  - Make all enum options to drop-down menus.
  - Rename the title of `Position` box to `Transform`.
  - Remove sub-headers `Plane dimensions`,
    `Orientation` under Transform box.
  - Move offset related options to the bottom. Importing a single
    plane would be more common use case.
- Rename "Animate Image Sequences" to "Detect Image Sequences".
- Rename several labels and option names. Since drop-down allows more
  space, make some option names verbose.
- Remove the warning `'Opaque' does not support alpha`. It should be
  obvious from usual Blender usage, and doesn't need a special warning
  from the add-on.
- Disable Alpha Mode options instead of hiding it when use alpha is
  unchecked.
- Hide Track Camera option instead of disabling it when supported
  align modes are selected.
- Fix or rewrite several tool-tips.

Original PR by Sun Kim: blender/blender-addons!104936

Ref: !122345

Co-authored-by: Sun Kim <perplexing.sun@gmail.com>
2024-05-29 10:02:52 +10:00
Campbell Barton
aea2ac4c78 Fix images-as-planes potentially using linked-library data-blocks
Ensure data-block lookups never return linked-library data.
2024-05-28 16:00:22 +10:00
Campbell Barton
b776d2f5c5 Cleanup: avoid exception handling 2024-05-28 15:58:46 +10:00
Campbell Barton
ca9b105e6c Cleanup: spelling in comments 2024-05-28 13:47:43 +10:00
Damien Picard
3865eb5cdb Fix: error when selecting Size Mode in Import Images as Planes
When importing images as planes, on Size Mode update, this error would
be raised in the console because the update tried to assign a value to
a nonexistent member of the class:

Ref: !122343
2024-05-28 12:01:43 +10:00
Campbell Barton
7911e2614f Cleanup: remove redundant check in image as planes
There was a logical error in some code that didn't run,
remove the check.
2024-05-27 13:02:55 +10:00
Campbell Barton
b5003fa56c Support "Add -> Image -> Mesh Plane" as a built-in operator
Add the operator from the io_import_images_as_planes add-on,
making it a built-in operator.

The main differences with the add-on are:

- Compositor integration has been removed.
- The file handler for dropping images has been removed
  to avoid a popup whenever images are dropped onto Blender.

There were also changes to follow Blender's core scripts more closely:

- Defer imports where possible.
- Use `str.format`.
- Use double-quotes for non-enum strings.
- Remove or "_" prefix unused arguments.
- Avoid unnecessary use back-slashes for wrapping lines.

Otherwise all other functionality has been kept.

Ref !122223

Co-authored-by: Aaron Carlisle <carlisle.b3d@gmail.com>
Co-authored-by: Bastien Montagne <bastien@blender.org>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Brendon Murphy <meta.androcto1@gmail.com>
Co-authored-by: CoDEmanX <codemanx@gmx.de>
Co-authored-by: Dalai Felinto <dalai@blender.org>
Co-authored-by: Damien Picard <dam.pic@free.fr>
Co-authored-by: Daniel Salazar <zanqdo@gmail.com>
Co-authored-by: Florian Meyer <florianfelix@web.de>
Co-authored-by: Jacques Lucke <mail@jlucke.com>
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Co-authored-by: Jonathan Smith <j.jaydez@gmail.com>
Co-authored-by: Luca Bonavita <mindrones@gmail.com>
Co-authored-by: meta-androcto <meta.androcto1@gmail.com>
Co-authored-by: Philipp Oeser <info@graphics-engineer.com>
Co-authored-by: Pratik Borhade <pratikborhade302@gmail.com>
Co-authored-by: Rick Astley <mrbimax>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Co-authored-by: Sibo Van Gool <SiboVG>
Co-authored-by: Sun Kim <perplexing.sun@gmail.com>
Co-authored-by: Thomas Dinges <blender@dingto.org>
Co-authored-by: Victor Chedeville <victor-09@noreply.localhost>
2024-05-27 12:42:36 +10:00