Changeset View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Context not available. | |||||
| layout.operator("object.shade_flat", text="Shade Flat") | layout.operator("object.shade_flat", text="Shade Flat") | ||||
| layout.separator() | layout.separator() | ||||
| if obj.type in {'CURVE', 'FONT'}: | |||||
campbellbarton: This fails if `obj` is None (checked below). | |||||
| layout.operator_context = 'INVOKE_REGION_WIN' | |||||
| props = layout.operator("wm.context_modal_mouse", text="Extrude Size") | |||||
| props.data_path_iter = "selected_editable_objects" | |||||
| props.data_path_item = "data.extrude" | |||||
| props.input_scale = 0.01 | |||||
| props.header_text = "Extrude Size: %.3f" | |||||
| props = layout.operator("wm.context_modal_mouse", text="Width Size") | |||||
| props.data_path_iter = "selected_editable_objects" | |||||
| props.data_path_item = "data.offset" | |||||
| props.input_scale = 0.01 | |||||
| props.header_text = "Width Size: %.3f" | |||||
| layout.separator() | |||||
| if obj is None: | if obj is None: | ||||
| pass | pass | ||||
| elif obj.type == 'MESH': | elif obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL'}: | ||||
| layout.operator_context = 'INVOKE_REGION_WIN' | layout.operator_context = 'INVOKE_REGION_WIN' | ||||
| layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type") | layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type") | ||||
Done Inline ActionsThis can be removed if it's going to remain empty. campbellbarton: This can be removed if it's going to remain empty. | |||||
Done Inline ActionsThis should probably have a check for whether the object is actually an image empty: HooglyBoogly: This should probably have a check for whether the object is actually an image empty:
`if (obj. | |||||
| Context not available. | |||||
| layout.separator() | layout.separator() | ||||
| elif obj.type in {'CURVE', 'FONT'}: | |||||
| layout.operator_context = 'INVOKE_REGION_WIN' | |||||
| props = layout.operator("wm.context_modal_mouse", text="Extrude Size") | |||||
| props.data_path_iter = "selected_editable_objects" | |||||
| props.data_path_item = "data.extrude" | |||||
| props.input_scale = 0.01 | |||||
| props.header_text = "Extrude Size: %.3f" | |||||
| props = layout.operator("wm.context_modal_mouse", text="Width Size") | |||||
| props.data_path_iter = "selected_editable_objects" | |||||
| props.data_path_item = "data.offset" | |||||
| props.input_scale = 0.01 | |||||
| props.header_text = "Width Size: %.3f" | |||||
| layout.separator() | |||||
| layout.operator("object.convert", text="Convert to Mesh").target = 'MESH' | |||||
| layout.operator("object.convert", text="Convert to Grease Pencil").target = 'GPENCIL' | |||||
| layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type") | |||||
| layout.separator() | |||||
| elif obj.type == 'GPENCIL': | |||||
| layout.operator("gpencil.convert", text="Convert to Path").type = 'PATH' | |||||
| layout.operator("gpencil.convert", text="Convert to Bezier Curve").type = 'CURVE' | |||||
| layout.operator("gpencil.convert", text="Convert to Polygon Curve").type = 'POLY' | |||||
| layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type") | |||||
| layout.separator() | |||||
| elif obj.type == 'EMPTY': | elif obj.type == 'EMPTY': | ||||
| layout.operator_context = 'INVOKE_REGION_WIN' | layout.operator_context = 'INVOKE_REGION_WIN' | ||||
| Context not available. | |||||
| props.header_text = "Empty Draw Size: %.3f" | props.header_text = "Empty Draw Size: %.3f" | ||||
| layout.separator() | layout.separator() | ||||
| layout.operator("gpencil.trace_image") | |||||
| layout.separator() | |||||
| elif obj.type == 'LIGHT': | elif obj.type == 'LIGHT': | ||||
| light = obj.data | light = obj.data | ||||
| Context not available. | |||||
Done Inline ActionsThis shouldn't be needed. Multiple separators are now de-duplicated. campbellbarton: This shouldn't be needed. Multiple separators are now de-duplicated. | |||||
Done Inline ActionsClarification: the if selected_objects_len == 1: shouldn't be needed. campbellbarton: Clarification: the `if selected_objects_len == 1:` shouldn't be needed. | |||||
Done Inline ActionsI added that here to make sure there is always a separator after this group, even when the Join operator doesn't appear. Not sure how else to do that. billreynish: I added that here to make sure there is always a separator after this group, even when the Join… | |||||
Done Inline Actionsamong campbellbarton: `among` | |||||
Done Inline Actionsamong, also below. campbellbarton: `among`, also below. | |||||
Done Inline ActionsI don't think this is a good change, batch rename is quite a spesific operation, it's always available in the "Edit" menu, and swapping this out means you can't easily rename the active item - based on the selection. Further, this change could be made for other context menus too (but has not been), so this seems more like a design decision that's outside the scope of this patch. campbellbarton: I don't think this is a good change, batch rename is quite a spesific operation, it's always… | |||||
Done Inline ActionsThis works for empty objects too - which instance collections. campbellbarton: This works for empty objects too - which instance collections. | |||||
This fails if obj is None (checked below).