From 7c7f3776dd0e2f0125a4065e4b4d070a8666ef7c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 28 Nov 2018 17:49:52 +0100 Subject: Use collection and instance terminology in Python API This follows naming convention agreed on in T56648. --- .../scripts/startup/bl_ui/properties_freestyle.py | 10 +++--- release/scripts/startup/bl_ui/properties_object.py | 42 +++++++++++----------- .../scripts/startup/bl_ui/properties_particle.py | 42 +++++++++++----------- .../startup/bl_ui/properties_physics_cloth.py | 2 +- .../startup/bl_ui/properties_physics_common.py | 2 +- .../bl_ui/properties_physics_dynamicpaint.py | 2 +- .../startup/bl_ui/properties_physics_rigidbody.py | 2 +- .../startup/bl_ui/properties_physics_smoke.py | 6 ++-- .../startup/bl_ui/properties_physics_softbody.py | 2 +- release/scripts/startup/bl_ui/properties_scene.py | 2 +- 10 files changed, 56 insertions(+), 56 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index f5f15c7ca58..c67ea2d4b8b 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -208,7 +208,7 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel row.prop(lineset, "select_by_visibility", text="Visibility", toggle=True) row.prop(lineset, "select_by_edge_types", text="Edge Types", toggle=True) row.prop(lineset, "select_by_face_marks", text="Face Marks", toggle=True) - row.prop(lineset, "select_by_group", text="Group", toggle=True) + row.prop(lineset, "select_by_collection", text="Collection", toggle=True) row.prop(lineset, "select_by_image_border", text="Image Border", toggle=True) if lineset.select_by_visibility: @@ -247,11 +247,11 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel row.prop(lineset, "face_mark_negation", expand=True) row.prop(lineset, "face_mark_condition", expand=True) - if lineset.select_by_group: - col.label(text="Group:") + if lineset.select_by_collection: + col.label(text="Collection:") row = col.row() - row.prop(lineset, "group", text="") - row.prop(lineset, "group_negation", expand=True) + row.prop(lineset, "collection", text="") + row.prop(lineset, "collection_negation", expand=True) class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index a1bd50c32c5..aafeb0a103d 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -176,7 +176,7 @@ class COLLECTION_MT_specials(Menu): layout.operator("object.collection_unlink", icon='X') layout.operator("object.collection_objects_select") - layout.operator("object.dupli_offset_from_cursor") + layout.operator("object.instance_offset_from_cursor") class OBJECT_PT_collections(ObjectButtonsPanel, Panel): @@ -212,7 +212,7 @@ class OBJECT_PT_collections(ObjectButtonsPanel, Panel): row.menu("COLLECTION_MT_specials", icon='DOWNARROW_HLT', text="") row = col.box().row() - row.prop(collection, "dupli_offset", text="") + row.prop(collection, "instance_offset", text="") class OBJECT_PT_display(ObjectButtonsPanel, Panel): @@ -230,7 +230,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): is_geometry = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'}) is_wire = (obj_type in {'CAMERA', 'EMPTY'}) is_empty_image = (obj_type == 'EMPTY' and obj.empty_display_type == 'IMAGE') - is_dupli = (obj.dupli_type != 'NONE') + is_dupli = (obj.instance_type != 'NONE') col = flow.column() col.prop(obj, "show_name", text="Name") @@ -288,42 +288,42 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel): ob = context.object row = layout.row() - row.prop(ob, "dupli_type", expand=True) + row.prop(ob, "instance_type", expand=True) layout.use_property_split = True flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - if ob.dupli_type == 'FRAMES': + if ob.instance_type == 'FRAMES': col = flow.column(align=True) - col.prop(ob, "dupli_frames_start", text="Start") - col.prop(ob, "dupli_frames_end", text="End") + col.prop(ob, "instance_frames_start", text="Start") + col.prop(ob, "instance_frames_end", text="End") col = flow.column(align=True) - col.prop(ob, "dupli_frames_on", text="On") - col.prop(ob, "dupli_frames_off", text="Off") + col.prop(ob, "instance_frames_on", text="On") + col.prop(ob, "instance_frames_off", text="Off") col = flow.column(align=True) - col.prop(ob, "use_dupli_frames_speed", text="Speed") + col.prop(ob, "use_instance_frames_speed", text="Speed") - elif ob.dupli_type == 'VERTS': - layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation") + elif ob.instance_type == 'VERTS': + layout.prop(ob, "use_instance_vertices_rotation", text="Rotation") - elif ob.dupli_type == 'FACES': + elif ob.instance_type == 'FACES': col = flow.column() - col.prop(ob, "use_dupli_faces_scale", text="Scale") + col.prop(ob, "use_instance_faces_scale", text="Scale") sub = col.column() - sub.active = ob.use_dupli_faces_scale - sub.prop(ob, "dupli_faces_scale", text="Inherit Scale") + sub.active = ob.use_instance_faces_scale + sub.prop(ob, "instance_faces_scale", text="Inherit Scale") - elif ob.dupli_type == 'COLLECTION': + elif ob.instance_type == 'COLLECTION': col = flow.column() - col.prop(ob, "dupli_group", text="Collection") + col.prop(ob, "instance_collection", text="Collection") - if ob.dupli_type != 'NONE' or len(ob.particle_systems): + if ob.instance_type != 'NONE' or len(ob.particle_systems): col = flow.column(align=True) - col.prop(ob, "show_duplicator_for_viewport") - col.prop(ob, "show_duplicator_for_render") + col.prop(ob, "show_instancer_for_viewport") + col.prop(ob, "show_instancer_for_render") from .properties_animviz import ( diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index f727f1110a4..c7b97836267 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -879,7 +879,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): layout.separator() - layout.prop(part, "collision_group") + layout.prop(part, "collision_collection") class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): @@ -1018,7 +1018,7 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): col.prop(part, "use_size_deflect") col.prop(part, "use_die_on_collision") - col.prop(part, "collision_group") + col.prop(part, "collision_collection") class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): @@ -1229,7 +1229,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel): if context.object: layout.separator() - layout.prop(context.object, "show_duplicator_for_render", text="Show Emitter") + layout.prop(context.object, "show_instancer_for_render", text="Show Emitter") class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): @@ -1366,11 +1366,11 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): col = layout.column() - col.prop(part, "dupli_object", text="Instance Object") + col.prop(part, "instance_object", text="Instance Object") sub = col.column() - sub.prop(part, "use_global_dupli", text="Global Coordinates") - sub.prop(part, "use_rotation_dupli", text="Object Rotation") - sub.prop(part, "use_scale_dupli", text="Object Scale") + sub.prop(part, "use_global_instance", text="Global Coordinates") + sub.prop(part, "use_rotation_instance", text="Object Rotation") + sub.prop(part, "use_scale_instance", text="Object Scale") class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): @@ -1392,15 +1392,15 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): col = layout.column() - col.prop(part, "dupli_group") + col.prop(part, "instance_collection") - col.prop(part, "use_whole_group") + col.prop(part, "use_whole_collection") sub = col.column() - sub.active = (part.use_whole_group is False) - sub.prop(part, "use_group_pick_random") - sub.prop(part, "use_global_dupli", text="Global Coordinates") - sub.prop(part, "use_rotation_dupli", text="Object Rotation") - sub.prop(part, "use_scale_dupli", text="Object Scale") + sub.active = (part.use_whole_collection is False) + sub.prop(part, "use_collection_pick_random") + sub.prop(part, "use_global_instance", text="Global Coordinates") + sub.prop(part, "use_rotation_instance", text="Object Rotation") + sub.prop(part, "use_scale_instance", text="Object Scale") class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): @@ -1418,9 +1418,9 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): layout = self.layout part = particle_get_settings(context) - layout.active = not part.use_whole_group + layout.active = not part.use_whole_collection - layout.prop(part, "use_group_count", text="") + layout.prop(part, "use_collection_count", text="") def draw(self, context): layout = self.layout @@ -1430,11 +1430,11 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): col = layout.column() - layout.active = part.use_group_count and not part.use_whole_group + layout.active = part.use_collection_count and not part.use_whole_collection row = layout.row() - row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights", - part, "active_dupliweight_index") + row.template_list("UI_UL_list", "particle_instance_weights", part, "instance_weights", + part, "active_instanceweight_index") col = row.column() sub = col.row() @@ -1446,7 +1446,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): subsub.separator() subsub.operator("particle.dupliob_refresh", icon='FILE_REFRESH', text="") - weight = part.active_dupliweight + weight = part.active_instanceweight if weight: row = layout.row() row.prop(weight, "count") @@ -1635,7 +1635,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel): if context.object: layout.separator() - layout.prop(context.object, "show_duplicator_for_viewport", text="Show Emitter") + layout.prop(context.object, "show_instancer_for_viewport", text="Show Emitter") class PARTICLE_PT_children(ParticleButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 8ccf3f63465..71731644caf 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -273,7 +273,7 @@ class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel): col.prop(cloth, "impulse_clamp") col = flow.column() - col.prop(cloth, "group") + col.prop(cloth, "collection") class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 49cd1a41499..9e537e85911 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -242,7 +242,7 @@ def effector_weights_ui(self, context, weights, weight_type): # NOTE: TODO temporarly used until the animate properties are properly skipped. layout.use_property_decorate = False # No animation (remove this later on). - layout.prop(weights, "group") + layout.prop(weights, "collection") flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True) diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index de76047b458..1d3866bb142 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -260,7 +260,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel): col.separator() col = flow.column() - col.prop(surface, "brush_group") + col.prop(surface, "brush_collection") if surface_type not in {'DISPLACE', 'WAVE'}: col = flow.column() # flow the layout otherwise. diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py index 13d07d64028..1c0598fb6dc 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py @@ -191,7 +191,7 @@ class PHYSICS_PT_rigid_body_collisions_collections(PHYSICS_PT_rigidbody_panel, P ob = context.object rbo = ob.rigid_body - layout.prop(rbo, "collision_groups", text="") + layout.prop(rbo, "collision_collections", text="") class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index 9c502bbd9d6..4fd79f26b0b 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -487,11 +487,11 @@ class PHYSICS_PT_smoke_collections(PhysicButtonsPanel, Panel): domain = context.smoke.domain_settings col = layout.column() - col.prop(domain, "fluid_group", text="Flow") + col.prop(domain, "fluid_collection", text="Flow") # col = layout.column() - # col.prop(domain, "effector_group", text="Effector") - col.prop(domain, "collision_group", text="Collision") + # col.prop(domain, "effector_collection", text="Effector") + col.prop(domain, "collision_collection", text="Collision") class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index 4b3867f8970..12fb2973b4f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -56,7 +56,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): md = context.soft_body softbody = md.settings - layout.prop(softbody, "collision_group") + layout.prop(softbody, "collision_collection") class PHYSICS_PT_softbody_object(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 6f1060323b2..32524ec092c 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -400,7 +400,7 @@ class SCENE_PT_rigid_body_world_settings(SceneButtonsPanel, Panel): col.active = rbw.enabled col = col.column() - col.prop(rbw, "group") + col.prop(rbw, "collection") col.prop(rbw, "constraints") col = col.column() -- cgit v1.2.3