Images as Planes: Improve option panels #104936
@ -804,6 +804,8 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
|
||||
def draw_material_config(self, context):
|
||||
# --- Material / Rendering Properties --- #
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
box = layout.box()
|
||||
|
||||
box.label(text="Compositing Nodes:", icon='RENDERLAYERS')
|
||||
@ -812,24 +814,19 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
|
||||
box = layout.box()
|
||||
box.label(text="Material Settings:", icon='MATERIAL')
|
||||
|
||||
box.label(text="Material Type")
|
||||
row = box.row()
|
||||
row.prop(self, 'shader', expand=True)
|
||||
row.prop(self, 'shader', expand=False)
|
||||
if self.shader == 'EMISSION':
|
||||
box.prop(self, "emit_strength")
|
||||
|
||||
box.label(text="Blend Mode")
|
||||
row = box.row()
|
||||
row.prop(self, 'blend_method', expand=True)
|
||||
if self.use_transparency and self.alpha_mode != "NONE" and self.blend_method == "OPAQUE":
|
||||
box.label(text="'Opaque' does not support alpha", icon="ERROR")
|
||||
row.prop(self, 'blend_method', expand=False)
|
||||
if self.blend_method == 'BLEND':
|
||||
row = box.row()
|
||||
row.prop(self, "show_transparent_back")
|
||||
|
||||
box.label(text="Shadow Mode")
|
||||
row = box.row()
|
||||
row.prop(self, 'shadow_method', expand=True)
|
||||
row.prop(self, 'shadow_method', expand=False)
|
||||
|
||||
row = box.row()
|
||||
row.prop(self, "use_backface_culling")
|
||||
@ -842,17 +839,15 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
|
||||
layout = self.layout
|
||||
box = layout.box()
|
||||
box.label(text="Texture Settings:", icon='TEXTURE')
|
||||
box.label(text="Interpolation")
|
||||
row = box.row()
|
||||
row.prop(self, 'interpolation', expand=True)
|
||||
box.label(text="Extension")
|
||||
row.prop(self, 'interpolation', expand=False)
|
||||
row = box.row()
|
||||
row.prop(self, 'extension', expand=True)
|
||||
row.prop(self, 'extension', expand=False)
|
||||
row = box.row()
|
||||
row.prop(self, "use_transparency")
|
||||
if self.use_transparency:
|
||||
sub = row.row()
|
||||
sub.prop(self, "alpha_mode", text="")
|
||||
row = box.row()
|
||||
row.enabled = self.use_transparency
|
||||
row.prop(self, "alpha_mode")
|
||||
row = box.row()
|
||||
row.prop(self, "use_auto_refresh")
|
||||
|
||||
@ -861,18 +856,18 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
|
||||
layout = self.layout
|
||||
box = layout.box()
|
||||
|
||||
box.label(text="Position:", icon='SNAP_GRID')
|
||||
box.label(text="Transform:", icon='SNAP_GRID')
|
||||
box.prop(self, "offset")
|
||||
col = box.column()
|
||||
row = col.row()
|
||||
row.prop(self, "offset_axis", expand=True)
|
||||
row.prop(self, "offset_axis", expand=False)
|
||||
row = col.row()
|
||||
row.prop(self, "offset_amount")
|
||||
col.enabled = self.offset
|
||||
|
||||
box.label(text="Plane dimensions:", icon='ARROW_LEFTRIGHT')
|
||||
box.label(text="Plane dimensions:")
|
||||
row = box.row()
|
||||
row.prop(self, "size_mode", expand=True)
|
||||
row.prop(self, "size_mode", expand=False)
|
||||
if self.size_mode == 'ABSOLUTE':
|
||||
box.prop(self, "height")
|
||||
elif self.size_mode == 'CAMERA':
|
||||
@ -887,7 +882,7 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper):
|
||||
row.prop(self, "align_axis")
|
||||
row = box.row()
|
||||
row.enabled = 'CAM' in self.align_axis
|
||||
row.alignment = 'RIGHT'
|
||||
row = box.row()
|
||||
row.prop(self, "align_track")
|
||||
|
||||
def draw(self, context):
|
||||
|
Loading…
Reference in New Issue
Block a user