def __draw_description_properties(self, layout: bpy.types.UILayout, description_properties: WorkpieceDescription): description_box = layout.box() description_box.label(text="Type", icon="OOPS") description_box.prop(description_properties, "cutting_list_type", text="") description_box.label(text="Piece name", icon="SORTALPHA") description_box.prop(description_properties, "piece_name", text="") description_box.label(text="Comments", icon="TEXT") description_box.prop(description_properties, "comments", text="") description_box.prop(description_properties, "is_in_group") if description_properties.is_in_group: if not description_properties.create_new_group: if len(self.group_items) > 0: description_box.template_list( "GroupUIList", "", self, "group_items", description_properties, "active_group_index", rows=4, maxrows=4) description_box.prop(description_properties, "create_new_group", emboss=True) else: description_box.prop(description_properties, "create_new_group", emboss=True) description_box.prop(description_properties, "group_name")
def draw_collapsible_box(parent: bpy.types.UILayout, text: str, object_with_expand_property, expand_property_field: str, remove_operator_id: str = None): """ :param parent: the parent layout :param text: the text for the expand handle :param object_with_expand_property: object with the expand/collapse property :param expand_property_field: expand/collapse field on the object :param remove_operator_id: id of the remove operator (may be None for no remove operator) :return: (the collapsible box, remove operator) """ box = parent.box() row = box.row() draw_expand_handle(row, text, object_with_expand_property, expand_property_field) if remove_operator_id is not None: remove_operator = row.operator(remove_operator_id, icon='CANCEL', text='') else: remove_operator = None return box, remove_operator
def draw_developer_settings_ui(layout: bpy.types.UILayout): mixer_prefs = get_mixer_prefs() layout.prop(mixer_prefs, "statistics_directory", text="Stats Directory") layout.operator(bl_operators.OpenStatsDirOperator.bl_idname, text="Open Directory") layout.operator(bl_operators.WriteStatisticsOperator.bl_idname, text="Write Statistics") layout.prop(mixer_prefs, "auto_save_statistics", text="Auto Save Statistics") layout.prop(mixer_prefs, "no_send_scene_content", text="No send_scene_content") layout.prop(mixer_prefs, "no_start_server", text="Do not start server on connect") layout.prop(mixer_prefs, "send_base_meshes", text="Send Base Meshes") layout.prop(mixer_prefs, "send_baked_meshes", text="Send Baked Meshes") layout.prop(mixer_prefs, "commands_send_interval") box = layout.box().column() box.label(text="Gizmos") box.prop(mixer_prefs, "display_own_gizmos") box.prop(mixer_prefs, "display_frustums_gizmos") box.prop(mixer_prefs, "display_names_gizmos") box.prop(mixer_prefs, "display_ids_gizmos") box.prop(mixer_prefs, "display_selections_gizmos")
def draw(layout: bpy.types.UILayout, effect: RichStripEffect, data: RichStripData, mask_modifier: bpy.types.SequenceModifier, mask_through: BoolProperty = None): box = layout.box() box.label(text="Mask", icon="MOD_MASK") row = box.row(align=True) row.prop(mask_modifier, "input_mask_id", text="") maskName = "" if mask_modifier.input_mask_id is not None: maskName = mask_modifier.input_mask_id.name row.operator( "icetb.richstrip_annotation2mask", text="", icon="GREASEPENCIL").effectName_plusmaskId = "%s$$%d_%d$$%s" % ( effect.EffectType, data.RichStripID, effect.EffectId, "true" if maskName == "" else "false") row.operator("icetb.richstrip_openmaskeditor", text="", icon="EDITMODE_HLT").maskName = maskName if maskName != "": mask = mask_modifier.input_mask_id row.prop(mask.layers[mask.active_layer_index], "invert", toggle=1, icon="LOOP_FORWARDS", text="") if mask_through: box.prop(mask_through, "value", toggle=0, text="Mask through")
def __draw_size_properties(layout: bpy.types.UILayout, size_properties: WorkpieceSize): size_box = layout.box() size_box.label(text="Thickness", icon="SETTINGS") size_box.prop(size_properties, "thickness", text="") size_box.label(text="Length", icon="SETTINGS") size_box.prop(size_properties, "length", text="") size_box.label(text="Width", icon="SETTINGS") size_box.prop(size_properties, "width", text="")
def draw(cls, context, layout:bpy.types.UILayout, data, effect, richstrip): glowlayer = cls.getEffectStrip(richstrip, effect, "glow") box = layout.box() box.label(text="Glow", icon="LIGHT") exportbox.draw(box, richstrip, "threshold", glowlayer, "threshold", text="Threshold") exportbox.draw(box, richstrip, "clamp", glowlayer, "clamp", text="Clamp") exportbox.draw(box, richstrip, "boost_factor", glowlayer, "boost_factor", text="Boost Factor") box.prop(glowlayer, "use_only_boost", toggle=0) layout.separator() box = layout.box() box.label(text="Blur", icon="MATFLUID") exportbox.draw(box, richstrip, "blur", glowlayer, "blur_radius", text="Blur Radius") exportbox.draw(box, richstrip, "quality", glowlayer, "quality", text="Quality") layout.separator() maskbox.draw(layout, effect, data, glowlayer.modifiers.get(cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask")), cls.getBoolProperty(effect, "mask_through"))
def __draw_count_properties(layout: bpy.types.UILayout, count_properties: WorkpieceCount): count_box = layout.box() count_box.label(text="Count", icon="ORTHO") count_box.prop(count_properties, "count", text="") if count_properties.count > 1: count_box.prop(count_properties, "use_same_mesh", text="Use same mesh", icon="LINKED", toggle=True) count_box.label(text="Distance", icon='ARROW_LEFTRIGHT') count_box.prop(count_properties, "distance", text="")
def __draw_position_properties(layout: bpy.types.UILayout, position_properties: WorkpiecePosition): position_box = layout.box() position_box.label(text="Visible face", icon="SNAP_FACE") position_box.prop(position_properties, "visible_surface", text="") position_box.label(text="Orientation", icon="FILE_REFRESH") position_box.prop(position_properties, "orientation", text="") position_box.label(text="View", icon="RESTRICT_VIEW_OFF") position_box.prop(position_properties, "view", text="") WorkpieceOperator.__draw_location_properties(position_box, position_properties)
def draw(cls, context, layout:bpy.types.UILayout, data, effect, richstrip): blurlayer = cls.getEffectStrip(richstrip, effect, "blur") blacklayer = cls.getEffectStrip(richstrip, effect, "black") copylayer = cls.getEffectStrip(richstrip, effect, "copy") box = layout.box() box.label(text="Shadow", icon="MATERIAL") cb = blacklayer.modifiers.get(cls.genRegularStripName(data.RichStripID, effect.EffectId, "cb")) split = box.split(factor=0.2) split.column().label(text="Color") split.column().prop(cb.color_balance, "gain", text="") exportbox.draw(box, richstrip, "offset", blacklayer, cls.genbinderName(effect, "offset", True), "Offset") exportbox.draw(box, richstrip, "angle", blacklayer, cls.genbinderName(effect, "angle", True), "Direction") xylock.drawWithExportBox(box, richstrip, blacklayer, "scale_start_x", "scaleX", blacklayer, "scale_start_y", "scaleY", blacklayer, "use_uniform_scale", union_label="Scale") exportbox.draw(box, richstrip, "opacity", blurlayer, "blend_alpha", "Shadow opacity") box.prop(copylayer, "mute", toggle=1, text="Only Shadow", icon='GHOST_ENABLED') layout.separator() box = layout.box() box.label(text="Blur", icon="MATFLUID") xylock.drawWithExportBox(box, richstrip, blurlayer, "size_x", "strongX", blurlayer, cls.genbinderName(effect, "size_y", True), "strongY", cls.getBoolProperty(effect, "union_size_lock"), "value", union_label="Strong")
def draw_render_controller(self, rc, col: bpy.types.UILayout): ''' Draws single render controller GUI ''' geo_cache = rc.geometry_cache texture_cache = rc.texture_cache geo_choice = geo_cache.is_cached and len(geo_cache.values) > 1 texture_choice = texture_cache.is_cached and len( texture_cache.values) > 1 material_choice = False for mat in rc.materials: mat_cache = mat.value_cache # Not cached (shouldn't happen) -> assume you can select something # Cached -> check if there are at least 2 items (a choice for user) if (not mat_cache.is_cached or (mat_cache.is_cached and len(mat_cache.values) > 1)): material_choice = True break if (not geo_choice and not texture_choice and not material_choice): return # Nothing to draw box = col.box() col = box.column() row = col.row() row.label(text=f'{rc.name}') if geo_choice: col.prop(rc, "geometry", text="Geometry") if texture_choice: col.prop(rc, "texture", text="Texture") if material_choice: box = col.box() col = box.column() row = col.row() row.label(text="Materials") for mat in rc.materials: mat_cache = mat.value_cache if (not mat_cache.is_cached or (mat_cache.is_cached and len(mat_cache.values) > 1)): col.prop(mat, "value", text=mat.name)
def draw_gizmos_settings_ui(layout: bpy.types.UILayout): mixer_prefs = get_mixer_prefs() mixer_props = get_mixer_props() collapsable_panel(layout, mixer_props, "display_gizmos_options", text="Gizmos") if mixer_props.display_gizmos_options: box = layout.box() box.prop(mixer_prefs, "display_frustums_gizmos") box.prop(mixer_prefs, "display_frustums_names_gizmos") box.prop(mixer_prefs, "display_selections_gizmos") box.prop(mixer_prefs, "display_selections_names_gizmos")
def powermanage_draw(column: bpy.types.UILayout): wm = bpy.context.window_manager if hasattr(wm, 'powermanage'): wm.powermanage.draw_panel(column) else: box = column.box().column() box.label(text='Check out PowerManage!') url = 'https://gumroad.com/l/powermanage' utils.ui.draw_op(box, 'Gumroad', 'wm.url_open', {'url': url}) url = 'https://blendermarket.com/products/powermanage' utils.ui.draw_op(box, 'BlenderMarket', 'wm.url_open', {'url': url})
def draw_item(self, context: bpy.types.Context, layout: bpy.types.UILayout, data: bpy.types.WindowManager, item: TresorioFarmProps, icon: int, active_data: bpy.types.WindowManager, active_propname: str, index: int) -> None: box = layout.box() box.enabled = item.is_available box.scale_x = 0.5 box.scale_y = 0.5 split = box.split() if item.gpu != 0: split.label(text=str(item.gpu)) split.label(text=str(item.cpu)) split.label(text=str(math.floor(item.ram / 1000)) + " " + TRADUCTOR['field']['GB'][CONFIG_LANG]) split.label(text=str(float("{:.2f}".format(item.cost))))
def draw_action(self, action, action_index: int, parent: bpy.types.UILayout) -> None: box = parent.box() row = box.row() MidiInstrumentPanel.draw_expand_handle(row, action.name, action, "expanded") remove_operator = row.operator(RemoveActionFromInstrument.bl_idname, icon='CANCEL', text='') remove_operator.action_index = action_index if action.expanded: box.prop(action, "name") MidiPanel.draw_note_action_common(box, box.column(align=True), action)
def draw_developer_settings_ui(layout: bpy.types.UILayout): mixer_prefs = get_mixer_prefs() layout.prop(mixer_prefs, "no_send_scene_content", text="No send_scene_content") layout.prop(mixer_prefs, "no_start_server", text="Do not start server on connect") layout.prop(mixer_prefs, "send_base_meshes", text="Send Base Meshes") layout.prop(mixer_prefs, "send_baked_meshes", text="Send Baked Meshes") layout.prop(mixer_prefs, "commands_send_interval") box = layout.box().column() box.label(text="Gizmos") box.prop(mixer_prefs, "display_own_gizmos") box.prop(mixer_prefs, "display_frustums_gizmos") box.prop(mixer_prefs, "display_names_gizmos") box.prop(mixer_prefs, "display_ids_gizmos") box.prop(mixer_prefs, "display_selections_gizmos")
def message_box(context: bpy.types.Context, layout: bpy.types.UILayout, text: str, icon: str = "NONE") -> bpy.types.UILayout: box = layout.box() sub = box if icon: row = box.row(align=True) row.label(text="", icon=icon) sub = row wrapped_label(context, sub, text) return box
def draw_advanced_settings_ui(layout: bpy.types.UILayout): mixer_prefs = get_mixer_prefs() mixer_props = get_mixer_props() collapsable_panel(layout, mixer_props, "display_advanced_options", text="Advanced Settings") if mixer_props.display_advanced_options: box = layout.box() box.prop(mixer_prefs, "data_directory", text="Data Directory") box.prop(mixer_prefs, "ignore_version_check") box.prop(mixer_prefs, "log_level") box.prop(mixer_prefs, "show_server_console") box.prop(mixer_prefs, "vrtist_protocol")
def draw(cls, context, layout:bpy.types.UILayout, data, effect, richstrip): blurlayer = cls.getEffectStrip(richstrip, effect, "blur") mask_modifier = blurlayer.modifiers.get(cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask")) box = layout.box() box.label(text="Blur", icon="MATFLUID") xylock.drawWithExportBox(box, richstrip, blurlayer, "size_x", "strongX", blurlayer, cls.genbinderName(effect, "size_y", True), "strongY", cls.getBoolProperty(effect, "union_size_lock"), "value") layout.separator() mask_through = cls.getBoolProperty(effect, "mask_through") cropbox.draw(layout, blurlayer, mask_through) layout.separator() maskbox.draw(layout, effect, data, mask_modifier, mask_through=mask_through)
def draw_connection_panel(layout: bpy.types.UILayout, context: bpy.types.Context ) -> None: """Draws the panel to connect to Tresorio""" user_props = context.window_manager.tresorio_user_props report_props = bpy.context.window_manager.tresorio_report_props case = layout.row().split(factor=0.5) case.label(text=TRADUCTOR['field']['connection'][CONFIG_LANG]) align_case = case.column().row().split(factor=0.8) align_case.column().prop(user_props, 'langs') align_case.column().operator('tresorio.advanced_settings_navigation_in', icon_value=til.icon('TRESORIO_SETTINGS'), text='') box = layout.box() box.label(text=TRADUCTOR['field']['mail'][CONFIG_LANG] + ':') box.prop(user_props, 'email', text='') box.label(text=TRADUCTOR['field']['password'][CONFIG_LANG] + ':') row = box.row().split(factor=0.9) if user_props.show_password: row.prop(user_props, 'clear_password', text='') else: row.prop(user_props, 'hidden_password', text='') row.prop(user_props, 'show_password', icon_only=True, icon='HIDE_OFF') row = layout.row().split(factor=0.5) row.column().prop(user_props, 'remember_email', text=TRADUCTOR['field']['remember_email'][CONFIG_LANG]) col = row.column() if not report_props.login_in: col.operator('tresorio.login', icon_value=til.icon('TRESORIO_LOGIN'), text=TRADUCTOR['field']['login'][CONFIG_LANG]) else: col.label(text=TRADUCTOR['notif']['login_in'][CONFIG_LANG]) layout.separator(factor=2.0) layout.operator('tresorio.redirect_forgot_password', text=TRADUCTOR['field']['forgot_password'][CONFIG_LANG], icon_value=til.icon('TRESORIO_KEY')) layout.operator('tresorio.redirect_register', text=TRADUCTOR['field']['create_account'][CONFIG_LANG], icon_value=til.icon('TRESORIO_PROFILE'))
def draw_advanced_settings_panel(layout: bpy.types.UILayout, context: bpy.types.Context) -> None: """Draws the advanced settings panel""" user_props = context.window_manager.tresorio_user_props case = layout.row().split(factor=0.5) case.label(text=TRADUCTOR['field']['advanced_settings'][CONFIG_LANG]) case = case.row().split(factor=0.7) case.operator( 'tresorio.advanced_settings_reset', text=TRADUCTOR['field']['reset_advanced_settings'][CONFIG_LANG], icon='MODIFIER') case.operator('tresorio.advanced_settings_navigation_out', text='', icon='CANCEL') latest_version = user_props.latest_version actual_version = f"{API_CONFIG['version']['major']}.{API_CONFIG['version']['minor']}.{API_CONFIG['version']['patch']}" box = layout.split(factor=0.5).box() box.enabled = False box.scale_x = 0.5 box.scale_y = 0.5 box.label(text=TRADUCTOR['field']['version'][CONFIG_LANG] + " : " + actual_version) box.label(text=TRADUCTOR['field']['latest'][CONFIG_LANG] + " : " + latest_version) box = layout.box() split = box.split(factor=0.4, align=True) split.alignment = 'RIGHT' split.label(text=TRADUCTOR['field']['backend_ip'][CONFIG_LANG]) split.prop(user_props, 'backend_ip_address', text='') split = box.split(factor=0.4) split.alignment = 'RIGHT' split.label(text=TRADUCTOR['field']['backend_port'][CONFIG_LANG]) split.prop(user_props, 'backend_port', text='') split = box.split(factor=0.4) split.alignment = 'RIGHT' split.label(text=TRADUCTOR['field']['backend_https'][CONFIG_LANG]) split.prop(user_props, 'backend_https', text='') layout.operator('tresorio.advanced_settings', icon='CHECKMARK', text=TRADUCTOR['field']['save_settings'][CONFIG_LANG])
def draw_stripes(self, mask, mask_index: int, col: bpy.types.UILayout): '''Draws stripes of UV-mask.''' box = col.box() row = box.row() row.label(text='Stripes') op_props = row.operator("object.nusiq_mcblend_add_uv_mask_stripe", text="", icon='ADD') op_props.mask_index = mask_index stripes_len = len(mask.stripes) for stripe_index, stripe in enumerate(mask.stripes): row = box.row() if (mask.relative_boundaries and mask.mask_type != UvMaskTypes.GRADIENT_MASK.value): # Gradient mask always uses absolute values row.prop(stripe, "width_relative") else: row.prop(stripe, "width") row.prop(stripe, "strength") up_down_row = row.row(align=True) # Move down if stripe_index - 1 >= 0: op_props = up_down_row.operator( "object.nusiq_mcblend_move_uv_mask_stripe", icon='TRIA_UP', text='') op_props.mask_index = mask_index op_props.move_from = stripe_index op_props.move_to = stripe_index - 1 # Move up if stripe_index + 1 < stripes_len: op_props = up_down_row.operator( "object.nusiq_mcblend_move_uv_mask_stripe", icon='TRIA_DOWN', text='') op_props.mask_index = mask_index op_props.move_from = stripe_index op_props.move_to = stripe_index + 1 # Delete button op_props = row.operator( "object.nusiq_mcblend_remove_uv_mask_stripe", icon='X', text='') op_props.mask_index = mask_index op_props.stripe_index = stripe_index
def draw(layout: bpy.types.UILayout, targetSeq: bpy.types.Sequence, enableProperty: BoolProperty): box = layout.box() box.label(text="Crop", icon="FULLSCREEN_ENTER") split = box.split(factor=1.0 / 3, align=True) col1, col2, col3 = split.column(), split.column(), split.column() col1.label(text="") col2.prop(targetSeq.crop, "max_y", text="") col3.label(text="") col1.prop(targetSeq.crop, "min_x", text="") col2.label(text="") col3.prop(targetSeq.crop, "max_x", text="") col1.label(text="") col2.prop(targetSeq.crop, "min_y", text="") col3.label(text="") box.prop(enableProperty, "value", text="Crop through", toggle=0)
def draw_effect(self, effect, index: int, col: bpy.types.UILayout): '''Draw single effect in the event''' # If parent is collapsed don't draw anything box = col.box() col = box.column() row = col.row() row.label(text=f'{effect.effect_type}') # Delete button op_props = row.operator("mcblend.remove_effect", icon='X', text='') op_props.effect_index = index if effect.effect_type == EffectTypes.PARTICLE_EFFECT.value: col.prop(effect, "effect", text="Effect") col.prop(effect, "locator", text="Locator") col.prop(effect, "pre_effect_script", text="Pre effect script") col.prop(effect, "bind_to_actor", text="Bind to actor") elif effect.effect_type == EffectTypes.SOUND_EFFECT.value: col.prop(effect, "effect", text="Effect")
def draw_developer_settings_ui(layout: bpy.types.UILayout): mixer_prefs = get_mixer_prefs() mixer_props = get_mixer_props() collapsable_panel(layout, mixer_props, "display_developer_options", text="Developer Options") if mixer_props.display_developer_options: box = layout.box() box.prop(mixer_props, "display_rooms_details") box.prop(mixer_prefs, "no_send_scene_content") box.prop(mixer_prefs, "no_start_server") box.prop(mixer_prefs, "send_base_meshes", text="Send Base Meshes") box.prop(mixer_prefs, "send_baked_meshes", text="Send Baked Meshes") box.prop(mixer_prefs, "commands_send_interval") box.prop(mixer_prefs, "display_own_gizmos") box.prop(mixer_prefs, "display_ids_gizmos") box.prop(mixer_prefs, "display_debugging_tools")
def draw(cls, context, layout: bpy.types.UILayout, data, effect, richstrip): adjustlayer = cls.getEffectStrip(richstrip, effect, "adjust") modifier = adjustlayer.modifiers.get( cls.genRegularStripName(data.RichStripID, effect.EffectId, "bc")) mask_through = cls.getBoolProperty(effect, "mask_through") box = layout.box() box.label(text="Blend", icon="OVERLAY") exportbox.draw(box, richstrip, "bright", modifier, "bright", "Bright") exportbox.draw(box, richstrip, "contrast", modifier, "contrast", "Contrast") exportbox.draw(box, richstrip, "alpha", adjustlayer, "blend_alpha", "Opacity") layout.separator() cropbox.draw(layout, adjustlayer, mask_through) layout.separator() maskbox.draw(layout, effect, data, modifier, mask_through=mask_through)
def draw_colors(self, mask, mask_index: int, col: bpy.types.UILayout): '''Draws colors of UV-mask.''' box = col.box() row = box.row() row.label(text='Colors') op_props = row.operator("object.nusiq_mcblend_add_uv_mask_color", text="", icon='ADD') op_props.mask_index = mask_index colors_len = len(mask.colors) for color_index, color in enumerate(mask.colors): row = box.row() row.prop(color, "color", text="") up_down_row = row.row(align=True) # Move down if color_index - 1 >= 0: op_props = up_down_row.operator( "object.nusiq_mcblend_move_uv_mask_color", icon='TRIA_UP', text='') op_props.mask_index = mask_index op_props.move_from = color_index op_props.move_to = color_index - 1 # Move up if color_index + 1 < colors_len: op_props = up_down_row.operator( "object.nusiq_mcblend_move_uv_mask_color", icon='TRIA_DOWN', text='') op_props.mask_index = mask_index op_props.move_from = color_index op_props.move_to = color_index + 1 # Delete button op_props = row.operator( "object.nusiq_mcblend_remove_uv_mask_color", icon='X', text='') op_props.mask_index = mask_index op_props.color_index = color_index
def draw(cls, context, layout: bpy.types.UILayout, data, effect, richstrip): smtranf = cls.getEffectStrip(richstrip, effect, "sm") lgtranf = cls.getEffectStrip(richstrip, effect, "lg") mask_modifier = lgtranf.modifiers.get( cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask")) box = layout.box() box.label(text="Pixelize", icon="TEXTURE") xylock.drawWithExportBox(box, richstrip, smtranf, cls.genbinderName(effect, "strongX", True), "strongX", smtranf, cls.genbinderName(effect, "strongY", True), "strongY", smtranf, "use_uniform_scale", union_label="Strong") xylock.drawWithExportBox(box, richstrip, lgtranf, cls.genbinderName(effect, "fixX", True), "fixX", lgtranf, cls.genbinderName(effect, "fixY", True), "fixY", cls.getBoolProperty(effect, "fixScale"), "value", union_label="Fix Scale") layout.separator() maskbox.draw(layout, effect, data, mask_modifier, cls.getBoolProperty(effect, "mask_though"))
def draw_setting_shader_node_properties(self, layout: bpy.types.UILayout, nodes: Iterable[ShaderNode]): for node in nodes: if isinstance(node, ShaderNodeGroup): pass elif self.check_setting_node(node): pass else: continue col = layout.box().column(align=True) col.label(text=node.label) if isinstance(node, ShaderNodeValue): for node_output in node.outputs: col.prop(node_output, 'default_value', text=node_output.name) elif isinstance(node, ShaderNodeTexSky): if node.sky_type == 'HOSEK_WILKIE': col.label(text=_('Sun Direction')) col.prop(node, 'sun_direction', text='') col.prop(node, 'turbidity') col.prop(node, 'ground_albedo') else: for node_input in node.inputs: if node_input.is_linked: continue col.prop(node_input, 'default_value', text=node_input.name)
def draw_layout(cls, layout: bpy.types.UILayout, scene: bpy.types.Scene): layout.prop(scene.m3_import_options, "contentPreset") if scene.m3_import_options.contentPreset == M3ImportContentPreset.Custom: ImportPanel.draw_content_import( layout.box().column(heading="Content to import"), scene) if scene.m3_import_options.contentPreset not in [ M3ImportContentPreset.MeshMaterials, M3ImportContentPreset.MeshMaterialsVG ]: layout.prop(scene.m3_import_options, "armatureObject") layout.prop(scene.m3_import_options, "rootDirectory", text="Root Directory") layout.prop(scene.m3_import_options, "generateBlenderMaterials", text="Generate Blender Materials At Import") layout.prop(scene.m3_import_options, "applySmoothShading", text="Apply Smooth Shading") layout.prop(scene.m3_import_options, "markSharpEdges", text="Mark sharp edges") layout.prop(scene.m3_import_options, "teamColor", text="Team Color")
def draw(cls, context, layout: bpy.types.UILayout, data, effect, richstrip): movielayer = cls.getMovieStrip(richstrip) audiolayer = cls.getAudioStrip(richstrip) adjustlayer = cls.getEffectStrip(richstrip, effect, "adjust") box = layout.box() box.row().label(text="Translate", icon="ORIENTATION_LOCAL") xylock.drawWithExportBox_NoLock( box, richstrip, movielayer, cls.genbinderName(effect, "pos_x", True), "pos_x", movielayer, cls.genbinderName(effect, "pos_y", True), "pos_y") layout.separator() box = layout.box() box.label(text="Scale", icon="FIXED_SIZE") box.prop(cls.getEnumProperty(effect, "transform_type"), "value", text="Resize") xylock.drawWithExportBox(box, richstrip, movielayer, cls.genbinderName(effect, "scale_x", True), "scalex", movielayer, cls.genbinderName(effect, "scale_y", True), "scaley", cls.getBoolProperty(effect, "union_scale_lock"), "value", union_label="Scale") layout.separator() box = layout.box() box.label(text="Rotation", icon="DRIVER_ROTATIONAL_DIFFERENCE") exportbox.draw(box, richstrip, "rotation", movielayer, cls.genbinderName(effect, "rotation", True), text="Rotation") layout.separator() box = layout.box() box.label(text="Mirror", icon="MOD_MIRROR") row = box.row(align=True) row.prop(movielayer, "use_flip_x", toggle=1, text="Flip X", icon="ARROW_LEFTRIGHT") row.prop(movielayer, "use_flip_y", toggle=1, text="Flip Y", icon="EMPTY_SINGLE_ARROW") # box = layout.box() # box.row().label(text="Time (Only movie)") # box.prop(movielayer, "use_reverse_frames", toggle=1) if audiolayer is not None: layout.separator() box = layout.box() box.row().label(text="Audio") row = box.row(align=True) row.prop(audiolayer, "volume") row.prop(audiolayer, "mute", text="", toggle=0, icon="MUTE_IPO_ON") return
def draw(cls, context, layout: bpy.types.UILayout, data, effect, richstrip): smtranf = cls.getEffectStrip(richstrip, effect, "sm") mdtranf = cls.getEffectStrip(richstrip, effect, "md") lgtranf = cls.getEffectStrip(richstrip, effect, "lg") box = layout.box() box.label(text="Blur", icon="MATFLUID") xylock.drawWithExportBox(box, richstrip, smtranf, cls.genbinderName(effect, "strongX", True), "strongX", smtranf, cls.genbinderName(effect, "strongY", True), "strongY", smtranf, "use_uniform_scale", union_label="Blur Strong") exportbox.draw(box, richstrip, "mulstrong", mdtranf, cls.genbinderName(effect, "mulstrong", True), text="Multiply Strong") xylock.drawWithExportBox(box, richstrip, lgtranf, "scale_start_x", "fixX", lgtranf, "scale_start_y", "fixY", lgtranf, "use_uniform_scale", union_label="Fix Scale") layout.separator() box = layout.box() box.label(text="Color", icon="COLOR") exportbox.draw(box, richstrip, "opacity", lgtranf, "blend_alpha", text="Opacity") exportbox.draw(box, richstrip, "saturation", lgtranf, "color_saturation", text="Saturation") layout.separator() maskbox.draw(layout, effect, data, lgtranf.modifiers.get( cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask")), mask_through=cls.getBoolProperty(effect, "mask_through"))
def draw(cls, context, layout: bpy.types.UILayout, data, effect, richstrip): copylayer = cls.getEffectStrip(richstrip, effect, "copy") mask_modifier = copylayer.modifiers.get( cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask")) mask_through = cls.getBoolProperty(effect, "mask_through") box = layout.box() box.row().label(text="Translate", icon="ORIENTATION_LOCAL") xylock.drawWithExportBox_NoLock(box, richstrip, copylayer.transform, "offset_x", "pos_x", copylayer.transform, "offset_y", "pos_y") layout.separator() box = layout.box() box.label(text="Scale", icon="FIXED_SIZE") xylock.drawWithExportBox_NoLock(box, richstrip, copylayer.transform, "scale_x", "scalex", copylayer.transform, "scale_y", "scaley") layout.separator() box = layout.box() box.label(text="Rotation", icon="DRIVER_ROTATIONAL_DIFFERENCE") exportbox.draw(box, richstrip, "rotation", copylayer.transform, "rotation", text="Rotation") layout.separator() box = layout.box() box.label(text="Mirror", icon="MOD_MIRROR") row = box.row(align=True) row.prop(copylayer, "use_flip_x", toggle=1, text="Flip X", icon="ARROW_LEFTRIGHT") row.prop(copylayer, "use_flip_y", toggle=1, text="Flip Y", icon="EMPTY_SINGLE_ARROW") layout.separator() box = layout.box() box.row().label(text="Blend", icon="OVERLAY") # box.row().prop(copylayer, "blend_alpha") exportbox.draw(box, richstrip, "alpha", copylayer, "blend_alpha", text="Opacity") box.row().prop(mask_through, "value", text="Through") layout.separator() cropbox.draw(layout, copylayer, mask_through) layout.separator() maskbox.draw(layout, effect, data, mask_modifier, mask_through)