diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-28 19:49:52 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-28 20:22:51 +0300 |
commit | 7c7f3776dd0e2f0125a4065e4b4d070a8666ef7c (patch) | |
tree | c7be442387f617b6066a22cb1056d3b84f9566bc | |
parent | 98ecab1af07a6f8f31b7889d1da92593deb87ae2 (diff) |
Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
31 files changed, 190 insertions, 182 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index a57edf9b940..bcab5276060 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -506,15 +506,15 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph, } static bool object_render_hide_original(BL::Object::type_enum ob_type, - BL::Object::dupli_type_enum dupli_type) + BL::Object::instance_type_enum dupli_type) { /* metaball exception, they duplicate self */ if(ob_type == BL::Object::type_META) return false; - return (dupli_type == BL::Object::dupli_type_VERTS || - dupli_type == BL::Object::dupli_type_FACES || - dupli_type == BL::Object::dupli_type_FRAMES); + return (dupli_type == BL::Object::instance_type_VERTS || + dupli_type == BL::Object::instance_type_FACES || + dupli_type == BL::Object::instance_type_FRAMES); } static bool object_render_hide(BL::Object& b_ob, @@ -541,15 +541,15 @@ static bool object_render_hide(BL::Object& b_ob, } /* Both mode_PREVIEW and mode_VIEWPORT are treated the same here.*/ - const bool show_duplicator = depsgraph_mode == BL::Depsgraph::mode_RENDER - ? b_ob.show_duplicator_for_render() - : b_ob.show_duplicator_for_viewport(); + const bool show_instancer = depsgraph_mode == BL::Depsgraph::mode_RENDER + ? b_ob.show_instancer_for_render() + : b_ob.show_instancer_for_viewport(); if(has_particles) { - show_emitter = show_duplicator; + show_emitter = show_instancer; hide_emitter = !show_emitter; - } else if(b_ob.is_duplicator()) { - if(top_level || show_duplicator) { + } else if(b_ob.is_instancer()) { + if(top_level || show_instancer) { hide_as_dupli_parent = true; } } @@ -558,7 +558,7 @@ static bool object_render_hide(BL::Object& b_ob, BL::Object parent = b_ob.parent(); while(parent) { if(object_render_hide_original(b_ob.type(), - parent.dupli_type())) + parent.instance_type())) { if(parent_hide) { hide_as_dupli_child_original = true; diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 604c134a2f7..b04a0394141 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -812,7 +812,7 @@ static ShaderNode *add_node(Scene *scene, else if(b_node.is_a(&RNA_ShaderNodeTexCoord)) { BL::ShaderNodeTexCoord b_tex_coord_node(b_node); TextureCoordinateNode *tex_coord = new TextureCoordinateNode(); - tex_coord->from_dupli = b_tex_coord_node.from_dupli(); + tex_coord->from_dupli = b_tex_coord_node.from_instancer(); if(b_tex_coord_node.object()) { tex_coord->use_transform = true; tex_coord->ob_tfm = get_transform(b_tex_coord_node.object().matrix_world()); @@ -865,7 +865,7 @@ static ShaderNode *add_node(Scene *scene, BL::ShaderNodeUVMap b_uvmap_node(b_node); UVMapNode *uvm = new UVMapNode(); uvm->attribute = b_uvmap_node.uv_map(); - uvm->from_dupli = b_uvmap_node.from_dupli(); + uvm->from_dupli = b_uvmap_node.from_instancer(); node = uvm; } else if(b_node.is_a(&RNA_ShaderNodeTexPointDensity)) { diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py index f2001a1ae50..3e695f4d389 100644 --- a/release/scripts/freestyle/modules/parameter_editor.py +++ b/release/scripts/freestyle/modules/parameter_editor.py @@ -1188,8 +1188,8 @@ def get_dashed_pattern(linestyle): def get_grouped_objects(group): for ob in group.objects: - if ob.dupli_type == 'GROUP' and ob.dupli_group is not None: - for dupli in get_grouped_objects(ob.dupli_group): + if ob.instance_type == 'COLLECTION' and ob.instance_collection is not None: + for dupli in get_grouped_objects(ob.instance_collection): yield dupli else: yield ob @@ -1275,10 +1275,10 @@ def process(layer_name, lineset_name): upred = NotUP1D(upred) selection_criteria.append(upred) # prepare selection criteria by group of objects - if lineset.select_by_group: - if lineset.group is not None: - names = {getQualifiedObjectName(ob): True for ob in get_grouped_objects(lineset.group)} - upred = ObjectNamesUP1D(names, lineset.group_negation == 'EXCLUSIVE') + if lineset.select_by_collection: + if lineset.collection is not None: + names = {getQualifiedObjectName(ob): True for ob in get_grouped_objects(lineset.collection)} + upred = ObjectNamesUP1D(names, lineset.collection_negation == 'EXCLUSIVE') selection_criteria.append(upred) # prepare selection criteria by image border if lineset.select_by_image_border: diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py index 16b0b107927..f425278e8cb 100644 --- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -229,13 +229,13 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): def object_bbox_merge(bbox, ob, ob_space, offset_matrix): # Take collections instances into account (including linked one in this case). - if ob.type == 'EMPTY' and ob.dupli_type == 'COLLECTION': - grp_objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in ob.dupli_group.all_objects) + if ob.type == 'EMPTY' and ob.instance_type == 'COLLECTION': + grp_objects = tuple((ob.name, ob.library.filepath if ob.library else None) for ob in ob.instance_collection.all_objects) if (len(grp_objects) == 0): ob_bbox = ob.bound_box else: coords = objects_bbox_calc(ob_space, grp_objects, - Matrix.Translation(ob.dupli_group.dupli_offset).inverted()) + Matrix.Translation(ob.instance_collection.instance_offset).inverted()) ob_bbox = ((coords[0], coords[1], coords[2]), (coords[21], coords[22], coords[23])) elif ob.bound_box: ob_bbox = ob.bound_box @@ -390,11 +390,11 @@ def do_previews(do_objects, do_collections, do_scenes, do_data_intern): bpy.context.screen.scene = scene bpy.ops.object.collection_instance_add(collection=grp.name) - grp_ob = next((ob for ob in scene.objects if ob.dupli_group and ob.dupli_group.name == grp.name)) + grp_ob = next((ob for ob in scene.objects if ob.instance_collection and ob.dupli_coilection.name == grp.name)) grp_obname = grp_ob.name scene.update() - offset_matrix = Matrix.Translation(grp.dupli_offset).inverted() + offset_matrix = Matrix.Translation(grp.instance_offset).inverted() preview_render_do(render_context, 'collections', grp.name, objects, offset_matrix) diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index e74631256e3..4b28a9edf70 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -341,10 +341,10 @@ def axis_conversion_ensure(operator, forward_attr, up_attr): # return a tuple (free, object list), free is True if memory should be freed # later with free_derived_objects() def create_derived_objects(scene, ob): - if ob.parent and ob.parent.dupli_type in {'VERTS', 'FACES'}: + if ob.parent and ob.parent.instance_type in {'VERTS', 'FACES'}: return False, None - if ob.dupli_type != 'NONE': + if ob.instance_type != 'NONE': ob.dupli_list_create(scene) return True, [(dob.object, dob.matrix) for dob in ob.dupli_list] else: diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index dda1ab7b4ed..7779e1ba38a 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -104,7 +104,7 @@ class Collection(bpy_types.ID): """The collection instance objects this collection is used in""" import bpy return tuple(obj for obj in bpy.data.objects - if self == obj.dupli_group) + if self == obj.instance_collection) class Object(bpy_types.ID): diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index b59c6da7368..ad1488339df 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -640,10 +640,10 @@ class MakeDupliFace(Operator): for obj in objects: scene.objects.unlink(obj) - ob_new.dupli_type = 'FACES' + ob_new.instance_type = 'FACES' ob_inst.parent = ob_new - ob_new.use_dupli_faces_scale = True - ob_new.dupli_faces_scale = 1.0 / SCALE_FAC + ob_new.use_instance_faces_scale = True + ob_new.instance_faces_scale = 1.0 / SCALE_FAC ob_inst.select_set(True) ob_new.select_set(True) @@ -852,7 +852,7 @@ class TransformsToDeltasAnim(Operator): class DupliOffsetFromCursor(Operator): """Set offset used for collection instances based on cursor position""" - bl_idname = "object.dupli_offset_from_cursor" + bl_idname = "object.instance_offset_from_cursor" bl_label = "Set Offset From Cursor" bl_options = {'INTERNAL', 'UNDO'} @@ -864,7 +864,7 @@ class DupliOffsetFromCursor(Operator): scene = context.scene collection = context.collection - collection.dupli_offset = scene.cursor_location + collection.instance_offset = scene.cursor_location return {'FINISHED'} diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py index cca01a6f2fa..235db39e9b1 100644 --- a/release/scripts/startup/bl_operators/rigidbody.py +++ b/release/scripts/startup/bl_operators/rigidbody.py @@ -47,7 +47,7 @@ class CopyRigidbodySettings(Operator): "deactivate_angular_velocity", "linear_damping", "angular_damping", - "collision_groups", + "collision_collections", "mesh_source", "use_deform", "enabled", 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() diff --git a/release/scripts/templates_py/operator_modal_view3d_raycast.py b/release/scripts/templates_py/operator_modal_view3d_raycast.py index 4b9700dd3fe..e5467228dfa 100644 --- a/release/scripts/templates_py/operator_modal_view3d_raycast.py +++ b/release/scripts/templates_py/operator_modal_view3d_raycast.py @@ -23,7 +23,7 @@ def main(context, event): if obj.type == 'MESH': yield (obj, obj.matrix_world.copy()) - if obj.dupli_type != 'NONE': + if obj.instance_type != 'NONE': obj.dupli_list_create(scene) for dob in obj.dupli_list: obj_dupli = dob.object diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 65170c7c203..b5d47809606 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -921,7 +921,7 @@ static void node_shader_buts_tex_pointdensity(uiLayout *layout, bContext *UNUSED static void node_shader_buts_tex_coord(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiItemR(layout, ptr, "object", 0, NULL, 0); - uiItemR(layout, ptr, "from_dupli", 0, NULL, 0); + uiItemR(layout, ptr, "from_instancer", 0, NULL, 0); } static void node_shader_buts_bump(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) @@ -931,9 +931,9 @@ static void node_shader_buts_bump(uiLayout *layout, bContext *UNUSED(C), Pointer static void node_shader_buts_uvmap(uiLayout *layout, bContext *C, PointerRNA *ptr) { - uiItemR(layout, ptr, "from_dupli", 0, NULL, 0); + uiItemR(layout, ptr, "from_instancer", 0, NULL, 0); - if (!RNA_boolean_get(ptr, "from_dupli")) { + if (!RNA_boolean_get(ptr, "from_instancer")) { PointerRNA obptr = CTX_data_pointer_get(C, "active_object"); if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) { diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index c178f0b7389..4d648d8c00b 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -825,9 +825,10 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Self Friction", "Friction with self contact"); RNA_def_property_update(prop, 0, "rna_cloth_update"); - prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "group"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Collision Group", "Limit colliders to this Group"); + RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this Collection"); RNA_def_property_update(prop, 0, "rna_cloth_dependency_update"); prop = RNA_def_property(srna, "vertex_group_self_collisions", PROP_STRING, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index 03e00708738..5230157cfad 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -309,15 +309,16 @@ void RNA_def_collections(BlenderRNA *brna) PropertyRNA *prop; srna = RNA_def_struct(brna, "Collection", "ID"); + /* XXX: CAN WE RENAME TO Collection? */ RNA_def_struct_sdna(srna, "Group"); /* it is actually Collection but for 2.8 the dna is patched! */ RNA_def_struct_ui_text(srna, "Collection", "Collection of Object data-blocks"); RNA_def_struct_ui_icon(srna, ICON_GROUP); /* this is done on save/load in readfile.c, removed if no objects are in the collection and not in a scene */ RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); - prop = RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_TRANSLATION); + prop = RNA_def_property(srna, "instance_offset", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "dupli_ofs"); - RNA_def_property_ui_text(prop, "Dupli Offset", "Offset from the origin to use when instancing"); + RNA_def_property_ui_text(prop, "Instance Offset", "Offset from the origin to use when instancing"); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 523a4e4ad6e..11247fa6797 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -424,8 +424,9 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT, "rna_DynamicPaintSurface_uniqueName"); RNA_def_struct_name_property(srna, prop); - prop = RNA_def_property(srna, "brush_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "brush_collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); + RNA_def_property_pointer_sdna(prop, NULL, "brush_group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Brush Collection", "Only use brush objects from this collection"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_reset_dependency"); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 8169e88cac0..3742c70da17 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4057,9 +4057,9 @@ static void def_sh_tex_coord(StructRNA *srna) RNA_def_property_ui_text(prop, "Object", "Use coordinates from this object (for object texture coordinates output)"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); - prop = RNA_def_property(srna, "from_dupli", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "from_instancer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); - RNA_def_property_ui_text(prop, "From Dupli", "Use the parent of the dupli object if possible"); + RNA_def_property_ui_text(prop, "From Instancer", "Use the parent of the dupli object if possible"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } @@ -4355,9 +4355,9 @@ static void def_sh_uvmap(StructRNA *srna) { PropertyRNA *prop; - prop = RNA_def_property(srna, "from_dupli", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "from_instancer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); - RNA_def_property_ui_text(prop, "From Dupli", "Use the parent of the dupli object if possible"); + RNA_def_property_ui_text(prop, "From Instancer", "Use the parent of the dupli object if possible"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); RNA_def_struct_sdna_from(srna, "NodeShaderUVMap", "storage"); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 96def17bc3e..c10502df403 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -134,27 +134,27 @@ static const EnumPropertyItem parent_type_items[] = { {0, NULL, 0, NULL, NULL} }; -#define DUPLI_ITEMS_SHARED \ +#define INSTANCE_ITEMS_SHARED \ {0, "NONE", 0, "None", ""}, \ {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"}, \ {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices"}, \ {OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces"} -#define DUPLI_ITEM_COLLECTION \ +#define INSTANCE_ITEM_COLLECTION \ {OB_DUPLICOLLECTION, "COLLECTION", 0, "Collection", "Enable collection instancing"} -static const EnumPropertyItem dupli_items[] = { - DUPLI_ITEMS_SHARED, - DUPLI_ITEM_COLLECTION, +static const EnumPropertyItem instance_items[] = { + INSTANCE_ITEMS_SHARED, + INSTANCE_ITEM_COLLECTION, {0, NULL, 0, NULL, NULL} }; #ifdef RNA_RUNTIME -static EnumPropertyItem dupli_items_nogroup[] = { - DUPLI_ITEMS_SHARED, +static EnumPropertyItem instance_items_nogroup[] = { + INSTANCE_ITEMS_SHARED, {0, NULL, 0, NULL, NULL} }; #endif -#undef DUPLI_ITEMS_SHARED -#undef DUPLI_ITEM_COLLECTION +#undef INSTANCE_ITEMS_SHARED +#undef INSTANCE_ITEM_COLLECTION const EnumPropertyItem rna_enum_metaelem_type_items[] = { {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""}, @@ -519,7 +519,7 @@ static void rna_Object_parent_bone_set(PointerRNA *ptr, const char *value) ED_object_parent(ob, ob->parent, ob->partype, value); } -static const EnumPropertyItem *rna_Object_dupli_type_itemf( +static const EnumPropertyItem *rna_Object_instance_type_itemf( bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { @@ -527,16 +527,16 @@ static const EnumPropertyItem *rna_Object_dupli_type_itemf( const EnumPropertyItem *item; if (ob->type == OB_EMPTY) { - item = dupli_items; + item = instance_items; } else { - item = dupli_items_nogroup; + item = instance_items_nogroup; } return item; } -static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value) +static void rna_Object_dup_collection_set(PointerRNA *ptr, PointerRNA value) { Object *ob = (Object *)ptr->data; Collection *grp = (Collection *)value.data; @@ -557,7 +557,7 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value) } else { BKE_report(NULL, RPT_ERROR, - "Cannot set dupli-group as object belongs in group being instanced, thus causing a cycle"); + "Cannot set instance-collection as object belongs in group being instanced, thus causing a cycle"); } } @@ -2203,7 +2203,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "trackflag"); RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_ui_text(prop, "Track Axis", - "Axis that points in 'forward' direction (applies to DupliFrame when " + "Axis that points in 'forward' direction (applies to InstanceFrame when " "parent 'Follow' is enabled)"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); @@ -2211,7 +2211,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "upflag"); RNA_def_property_enum_items(prop, up_items); RNA_def_property_ui_text(prop, "Up Axis", - "Axis that points in the upward direction (applies to DupliFrame when " + "Axis that points in the upward direction (applies to InstanceFrame when " "parent 'Follow' is enabled)"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); @@ -2219,7 +2219,8 @@ static void rna_def_object(BlenderRNA *brna) prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls"); - prop = RNA_def_property(srna, "proxy_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "proxy_collection", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "proxy_group"); RNA_def_property_ui_text(prop, "Proxy Collection", "Library collection duplicator object this proxy object controls"); /* materials */ @@ -2584,13 +2585,13 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_hide_update"); - prop = RNA_def_property(srna, "show_duplicator_for_render", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "show_instancer_for_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_RENDER); - RNA_def_property_ui_text(prop, "Render Duplicator", "Make duplicator visible when rendering"); + RNA_def_property_ui_text(prop, "Render Instancer", "Make duplicator visible when rendering"); - prop = RNA_def_property(srna, "show_duplicator_for_viewport", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "show_instancer_for_viewport", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_VIEWPORT); - RNA_def_property_ui_text(prop, "Display Duplicator", "Make duplicator visible in the viewport"); + RNA_def_property_ui_text(prop, "Display Instancer", "Make duplicator visible in the viewport"); /* anim */ rna_def_animdata_common(srna); @@ -2614,70 +2615,70 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); /* duplicates */ - prop = RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "instance_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag"); - RNA_def_property_enum_items(prop, dupli_items); - RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_dupli_type_itemf"); - RNA_def_property_ui_text(prop, "Dupli Type", "If not None, object duplication method to use"); + RNA_def_property_enum_items(prop, instance_items); + RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_instance_type_itemf"); + RNA_def_property_ui_text(prop, "Instance Type", "If not None, object duplication method to use"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); - prop = RNA_def_property(srna, "use_dupli_frames_speed", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_instance_frames_speed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED); - RNA_def_property_ui_text(prop, "Dupli Frames Speed", + RNA_def_property_ui_text(prop, "Instance Frames Speed", "Set dupliframes to use the current frame instead of parent curve's evaluation time"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "use_dupli_vertices_rotation", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_instance_vertices_rotation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT); RNA_def_property_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - prop = RNA_def_property(srna, "use_dupli_faces_scale", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_instance_faces_scale", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES_SCALE); - RNA_def_property_ui_text(prop, "Dupli Faces Inherit Scale", "Scale dupli based on face size"); + RNA_def_property_ui_text(prop, "Instance Faces Inherit Scale", "Scale dupli based on face size"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "dupli_faces_scale", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "instance_faces_scale", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dupfacesca"); RNA_def_property_range(prop, 0.001f, 10000.0f); - RNA_def_property_ui_text(prop, "Dupli Faces Scale", "Scale the DupliFace objects"); + RNA_def_property_ui_text(prop, "Instance Faces Scale", "Scale the DupliFace objects"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "instance_collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_group_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Dupli Collection", "Instance an existing collection"); + RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_collection_set", NULL, NULL); + RNA_def_property_ui_text(prop, "Instance Collection", "Instance an existing collection"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); - prop = RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE | PROP_UNIT_TIME); + prop = RNA_def_property(srna, "instance_frames_start", PROP_INT, PROP_NONE | PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupsta"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames"); + RNA_def_property_ui_text(prop, "Instance Frames Start", "Start frame for DupliFrames"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE | PROP_UNIT_TIME); + prop = RNA_def_property(srna, "instance_frames_end", PROP_INT, PROP_NONE | PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupend"); RNA_def_property_range(prop, MINAFRAME, MAXFRAME); - RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames"); + RNA_def_property_ui_text(prop, "Instance Frames End", "End frame for DupliFrames"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE | PROP_UNIT_TIME); + prop = RNA_def_property(srna, "instance_frames_on", PROP_INT, PROP_NONE | PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupon"); RNA_def_property_range(prop, 1, MAXFRAME); RNA_def_property_ui_range(prop, 1, 1500, 1, -1); - RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames"); + RNA_def_property_ui_text(prop, "Instance Frames On", "Number of frames to use between DupOff frames"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE | PROP_UNIT_TIME); + prop = RNA_def_property(srna, "instance_frames_off", PROP_INT, PROP_NONE | PROP_UNIT_TIME); RNA_def_property_int_sdna(prop, NULL, "dupoff"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 0, 1500, 1, -1); - RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes"); + RNA_def_property_ui_text(prop, "Instance Frames Off", "Recurring frames to exclude from the Dupliframes"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - prop = RNA_def_property(srna, "is_duplicator", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "is_instancer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -2794,7 +2795,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Dynamic Topology Sculpting", NULL); /* Base Settings */ - prop = RNA_def_property(srna, "is_from_duplicator", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "is_from_instancer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "base_flag", BASE_FROMDUPLI); RNA_def_property_ui_text(prop, "Base from Duplicator", "Object comes from a duplicator"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index e1090a3ded5..a58719085b9 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -994,8 +994,9 @@ static void rna_def_effector_weight(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_EffectorWeight_update"); /* General */ - prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); + RNA_def_property_pointer_sdna(prop, NULL, "group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Effector Collection", "Limit effectors to this collection"); RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update"); @@ -1781,8 +1782,9 @@ static void rna_def_softbody(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision"); RNA_def_property_update(prop, 0, "rna_softbody_update"); - prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collision_collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); + RNA_def_property_pointer_sdna(prop, NULL, "collision_group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection"); RNA_def_property_update(prop, 0, "rna_softbody_dependency_update"); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 1abba3979f0..4e9b738bfbd 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1562,7 +1562,7 @@ static void rna_def_particle_dupliweight(BlenderRNA *brna) PropertyRNA *prop; srna = RNA_def_struct(brna, "ParticleDupliWeight", NULL); - RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a group"); + RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a collection"); RNA_def_struct_sdna(srna, "ParticleDupliWeight"); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); @@ -2324,29 +2324,29 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Number", "Show particle number"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); - prop = RNA_def_property(srna, "use_group_pick_random", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_collection_pick_random", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR); - RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly"); + RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from collection randomly"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); - prop = RNA_def_property(srna, "use_group_count", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_collection_count", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_COUNT_GR); RNA_def_property_ui_text(prop, "Use Count", "Use object multiple times in the same collection"); RNA_def_property_update(prop, 0, "rna_Particle_redo_count"); - prop = RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_global_instance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GLOBAL_OB); RNA_def_property_ui_text(prop, "Global", "Use object's global coordinates for duplication"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); - prop = RNA_def_property(srna, "use_rotation_dupli", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_rotation_instance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_ROTATE_OB); RNA_def_property_ui_text(prop, "Rotation", "Use object's rotation for duplication (global x-axis is aligned " "particle rotation axis)"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); - prop = RNA_def_property(srna, "use_scale_dupli", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_scale_instance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "draw", PART_DRAW_NO_SCALE_OB); RNA_def_property_ui_text(prop, "Scale", "Use object's scale for duplication"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); @@ -2361,9 +2361,9 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); - prop = RNA_def_property(srna, "use_whole_group", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "use_whole_collection", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR); - RNA_def_property_ui_text(prop, "Whole Group", "Use whole group at once"); + RNA_def_property_ui_text(prop, "Whole Collection", "Use whole collection at once"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); prop = RNA_def_property(srna, "use_strand_primitive", PROP_BOOLEAN, PROP_NONE); @@ -2780,8 +2780,9 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); - prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collision_collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); + RNA_def_property_pointer_sdna(prop, NULL, "collision_group"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection"); RNA_def_property_update(prop, 0, "rna_Particle_reset_dependency"); @@ -3092,35 +3093,35 @@ static void rna_def_particle_settings(BlenderRNA *brna) "(must use same subsurf level for viewport and render for correct results)"); RNA_def_property_update(prop, 0, "rna_Particle_change_type"); - /* draw objects & groups */ - prop = RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE); + /* draw objects & collections */ + prop = RNA_def_property(srna, "instance_collection", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Dupli Collection", "Show Objects in this collection in place of particles"); RNA_def_property_update(prop, 0, "rna_Particle_redo_count"); - prop = RNA_def_property(srna, "dupli_weights", PROP_COLLECTION, PROP_NONE); + prop = RNA_def_property(srna, "instance_weights", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "dupliweights", NULL); RNA_def_property_struct_type(prop, "ParticleDupliWeight"); - RNA_def_property_ui_text(prop, "Dupli Group Weights", "Weights for all of the objects in the dupli group"); + RNA_def_property_ui_text(prop, "Dupli Collection Weights", "Weights for all of the objects in the dupli collection"); - prop = RNA_def_property(srna, "active_dupliweight", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "active_instanceweight", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ParticleDupliWeight"); RNA_def_property_pointer_funcs(prop, "rna_ParticleDupliWeight_active_get", NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Active Dupli Object", ""); - prop = RNA_def_property(srna, "active_dupliweight_index", PROP_INT, PROP_UNSIGNED); + prop = RNA_def_property(srna, "active_instanceweight_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_funcs(prop, "rna_ParticleDupliWeight_active_index_get", "rna_ParticleDupliWeight_active_index_set", "rna_ParticleDupliWeight_active_index_range"); RNA_def_property_ui_text(prop, "Active Dupli Object Index", ""); - prop = RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "instance_object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "dup_ob"); RNA_def_property_struct_type(prop, "Object"); RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles"); + RNA_def_property_ui_text(prop, "Instance Object", "Show this Object in place of particles"); RNA_def_property_update(prop, 0, "rna_Particle_redo_dependency"); prop = RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 4a36e2d00b7..e0d0ae57b30 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -267,7 +267,7 @@ static void rna_RigidBodyOb_collision_margin_set(PointerRNA *ptr, float value) #endif } -static void rna_RigidBodyOb_collision_groups_set(PointerRNA *ptr, const bool *values) +static void rna_RigidBodyOb_collision_collections_set(PointerRNA *ptr, const bool *values) { RigidBodyOb *rbo = (RigidBodyOb *)ptr->data; int i; @@ -768,8 +768,9 @@ static void rna_def_rigidbody_world(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_RigidBodyWorld_path"); /* groups */ - prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); + RNA_def_property_pointer_sdna(prop, NULL, "group"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); RNA_def_property_ui_text(prop, "Collection", "Collection containing objects participating in this simulation"); RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset"); @@ -1024,10 +1025,10 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) "(best results when non-zero)"); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_shape_reset"); - prop = RNA_def_property(srna, "collision_groups", PROP_BOOLEAN, PROP_LAYER_MEMBER); + prop = RNA_def_property(srna, "collision_collections", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "col_groups", 1); RNA_def_property_array(prop, 20); - RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyOb_collision_groups_set"); + RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyOb_collision_collections_set"); RNA_def_property_ui_text(prop, "Collision Collections", "Collision collections rigid body belongs to"); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 9d943dca9ec..d6d597aac73 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3384,7 +3384,7 @@ void rna_def_freestyle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - static const EnumPropertyItem group_negation_items[] = { + static const EnumPropertyItem collection_negation_items[] = { {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging to some object in the group"}, {FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not belonging to any object in the group"}, @@ -3458,9 +3458,9 @@ void rna_def_freestyle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select feature edges based on edge types"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); - prop = RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "select_by_collection", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_GROUP); - RNA_def_property_ui_text(prop, "Selection by Group", "Select feature edges based on a group of objects"); + RNA_def_property_ui_text(prop, "Selection by Collection", "Select feature edges based on a collection of objects"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE); @@ -3488,16 +3488,16 @@ void rna_def_freestyle_settings(BlenderRNA *brna) "Specify a logical combination of selection conditions on feature edge types"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); - prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "group"); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Collection", "A collection of objects based on which feature edges are selected"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); - prop = RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE); + prop = RNA_def_property(srna, "collection_negation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); - RNA_def_property_enum_items(prop, group_negation_items); + RNA_def_property_enum_items(prop, collection_negation_items); RNA_def_property_ui_text(prop, "Collection Negation", "Specify either inclusion or exclusion of feature edges belonging to a collection of objects"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 591798d508a..8e375c3645e 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -589,21 +589,21 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) "How much heat affects smoke motion (higher value results in faster rising smoke)"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); - prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "collision_collection", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "coll_group"); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Collision Collection", "Limit collisions to this collection"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset_dependency"); - prop = RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "fluid_collection", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "fluid_group"); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Fluid Collection", "Limit fluid objects to this collection"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset_dependency"); - prop = RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "effector_collection", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "eff_group"); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_flag(prop, PROP_EDITABLE); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d8db7b30de5..981aac18894 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -4330,7 +4330,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {FILTER_ID_CF, "CACHEFILE", ICON_FILE, "Cache Files", "Show/hide Cache File data-blocks"}, {FILTER_ID_CU, "CURVE", ICON_CURVE_DATA, "Curves", "Show/hide Curve data-blocks"}, {FILTER_ID_GD, "GREASE_PENCIL", ICON_GREASEPENCIL, "Grease Pencil", "Show/hide Grease pencil data-blocks"}, - {FILTER_ID_GR, "GROUP", ICON_GROUP, "Groups", "Show/hide Group data-blocks"}, + {FILTER_ID_GR, "GROUP", ICON_GROUP, "Collections", "Show/hide Collection data-blocks"}, {FILTER_ID_IM, "IMAGE", ICON_IMAGE_DATA, "Images", "Show/hide Image data-blocks"}, {FILTER_ID_LA, "LIGHT", ICON_LIGHT_DATA, "Lights", "Show/hide Light data-blocks"}, {FILTER_ID_LS, "LINESTYLE", ICON_LINE_DATA, @@ -4365,7 +4365,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) {FILTER_ID_AC, "ANIMATION", ICON_ANIM_DATA, "Animations", "Show/hide animation data"}, {FILTER_ID_OB | FILTER_ID_GR, - "OBJECT", ICON_GROUP, "Objects & Groups", "Show/hide objects and groups"}, + "OBJECT", ICON_GROUP, "Objects & Collections", "Show/hide objects and groups"}, {FILTER_ID_AR | FILTER_ID_CU | FILTER_ID_LT | FILTER_ID_MB | FILTER_ID_ME, "GEOMETRY", ICON_MESH_DATA, "Geometry", "Show/hide meshes, curves, lattice, armatures and metaballs data"}, {FILTER_ID_LS | FILTER_ID_MA | FILTER_ID_NT | FILTER_ID_TE, |