Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_metaball.py
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.separator() | col.separator() | ||||
| col.prop(mball, "update_method", text="Update on Edit") | col.prop(mball, "update_method", text="Update on Edit") | ||||
| class DATA_PT_mball_texture_space(DataButtonsPanel, Panel): | class DATA_PT_mball_texture_space(DataButtonsPanel, Panel): | ||||
| bl_label = "Texture Space" | bl_label = "Texture Space" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| mball = context.meta_ball | mball = context.meta_ball | ||||
| layout.prop(mball, "use_auto_texspace") | layout.prop(mball, "use_auto_texspace") | ||||
| Show All 38 Lines | def draw(self, context): | ||||
| sub.prop(metaelem, "size_x", text="Size X") | sub.prop(metaelem, "size_x", text="Size X") | ||||
| elif metaelem.type == 'PLANE': | elif metaelem.type == 'PLANE': | ||||
| sub.prop(metaelem, "size_x", text="Size X") | sub.prop(metaelem, "size_x", text="Size X") | ||||
| sub.prop(metaelem, "size_y", text="Y") | sub.prop(metaelem, "size_y", text="Y") | ||||
| class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel): | class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel): | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| _context_path = "object.data" | _context_path = "object.data" | ||||
| _property_type = bpy.types.MetaBall | _property_type = bpy.types.MetaBall | ||||
| classes = ( | classes = ( | ||||
| DATA_PT_context_metaball, | DATA_PT_context_metaball, | ||||
| DATA_PT_metaball, | DATA_PT_metaball, | ||||
| DATA_PT_mball_texture_space, | DATA_PT_mball_texture_space, | ||||
| DATA_PT_metaball_element, | DATA_PT_metaball_element, | ||||
| DATA_PT_custom_props_metaball, | DATA_PT_custom_props_metaball, | ||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||