Use collection and instance terminology in Python API

This follows naming convention agreed on in T56648.
This commit is contained in:
2018-11-28 17:49:52 +01:00
parent 98ecab1af0
commit 7c7f3776dd
31 changed files with 190 additions and 182 deletions

View File

@@ -506,15 +506,15 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
} }
static bool object_render_hide_original(BL::Object::type_enum ob_type, 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 */ /* metaball exception, they duplicate self */
if(ob_type == BL::Object::type_META) if(ob_type == BL::Object::type_META)
return false; return false;
return (dupli_type == BL::Object::dupli_type_VERTS || return (dupli_type == BL::Object::instance_type_VERTS ||
dupli_type == BL::Object::dupli_type_FACES || dupli_type == BL::Object::instance_type_FACES ||
dupli_type == BL::Object::dupli_type_FRAMES); dupli_type == BL::Object::instance_type_FRAMES);
} }
static bool object_render_hide(BL::Object& b_ob, 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.*/ /* Both mode_PREVIEW and mode_VIEWPORT are treated the same here.*/
const bool show_duplicator = depsgraph_mode == BL::Depsgraph::mode_RENDER const bool show_instancer = depsgraph_mode == BL::Depsgraph::mode_RENDER
? b_ob.show_duplicator_for_render() ? b_ob.show_instancer_for_render()
: b_ob.show_duplicator_for_viewport(); : b_ob.show_instancer_for_viewport();
if(has_particles) { if(has_particles) {
show_emitter = show_duplicator; show_emitter = show_instancer;
hide_emitter = !show_emitter; hide_emitter = !show_emitter;
} else if(b_ob.is_duplicator()) { } else if(b_ob.is_instancer()) {
if(top_level || show_duplicator) { if(top_level || show_instancer) {
hide_as_dupli_parent = true; hide_as_dupli_parent = true;
} }
} }
@@ -558,7 +558,7 @@ static bool object_render_hide(BL::Object& b_ob,
BL::Object parent = b_ob.parent(); BL::Object parent = b_ob.parent();
while(parent) { while(parent) {
if(object_render_hide_original(b_ob.type(), if(object_render_hide_original(b_ob.type(),
parent.dupli_type())) parent.instance_type()))
{ {
if(parent_hide) { if(parent_hide) {
hide_as_dupli_child_original = true; hide_as_dupli_child_original = true;

View File

@@ -812,7 +812,7 @@ static ShaderNode *add_node(Scene *scene,
else if(b_node.is_a(&RNA_ShaderNodeTexCoord)) { else if(b_node.is_a(&RNA_ShaderNodeTexCoord)) {
BL::ShaderNodeTexCoord b_tex_coord_node(b_node); BL::ShaderNodeTexCoord b_tex_coord_node(b_node);
TextureCoordinateNode *tex_coord = new TextureCoordinateNode(); 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()) { if(b_tex_coord_node.object()) {
tex_coord->use_transform = true; tex_coord->use_transform = true;
tex_coord->ob_tfm = get_transform(b_tex_coord_node.object().matrix_world()); 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); BL::ShaderNodeUVMap b_uvmap_node(b_node);
UVMapNode *uvm = new UVMapNode(); UVMapNode *uvm = new UVMapNode();
uvm->attribute = b_uvmap_node.uv_map(); 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; node = uvm;
} }
else if(b_node.is_a(&RNA_ShaderNodeTexPointDensity)) { else if(b_node.is_a(&RNA_ShaderNodeTexPointDensity)) {

View File

@@ -1188,8 +1188,8 @@ def get_dashed_pattern(linestyle):
def get_grouped_objects(group): def get_grouped_objects(group):
for ob in group.objects: for ob in group.objects:
if ob.dupli_type == 'GROUP' and ob.dupli_group is not None: if ob.instance_type == 'COLLECTION' and ob.instance_collection is not None:
for dupli in get_grouped_objects(ob.dupli_group): for dupli in get_grouped_objects(ob.instance_collection):
yield dupli yield dupli
else: else:
yield ob yield ob
@@ -1275,10 +1275,10 @@ def process(layer_name, lineset_name):
upred = NotUP1D(upred) upred = NotUP1D(upred)
selection_criteria.append(upred) selection_criteria.append(upred)
# prepare selection criteria by group of objects # prepare selection criteria by group of objects
if lineset.select_by_group: if lineset.select_by_collection:
if lineset.group is not None: if lineset.collection is not None:
names = {getQualifiedObjectName(ob): True for ob in get_grouped_objects(lineset.group)} names = {getQualifiedObjectName(ob): True for ob in get_grouped_objects(lineset.collection)}
upred = ObjectNamesUP1D(names, lineset.group_negation == 'EXCLUSIVE') upred = ObjectNamesUP1D(names, lineset.collection_negation == 'EXCLUSIVE')
selection_criteria.append(upred) selection_criteria.append(upred)
# prepare selection criteria by image border # prepare selection criteria by image border
if lineset.select_by_image_border: if lineset.select_by_image_border:

View File

@@ -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): def object_bbox_merge(bbox, ob, ob_space, offset_matrix):
# Take collections instances into account (including linked one in this case). # Take collections instances into account (including linked one in this case).
if ob.type == 'EMPTY' and ob.dupli_type == 'COLLECTION': 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.dupli_group.all_objects) 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): if (len(grp_objects) == 0):
ob_bbox = ob.bound_box ob_bbox = ob.bound_box
else: else:
coords = objects_bbox_calc(ob_space, grp_objects, 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])) ob_bbox = ((coords[0], coords[1], coords[2]), (coords[21], coords[22], coords[23]))
elif ob.bound_box: elif ob.bound_box:
ob_bbox = 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.context.screen.scene = scene
bpy.ops.object.collection_instance_add(collection=grp.name) 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 grp_obname = grp_ob.name
scene.update() 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) preview_render_do(render_context, 'collections', grp.name, objects, offset_matrix)

View File

@@ -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 # return a tuple (free, object list), free is True if memory should be freed
# later with free_derived_objects() # later with free_derived_objects()
def create_derived_objects(scene, ob): 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 return False, None
if ob.dupli_type != 'NONE': if ob.instance_type != 'NONE':
ob.dupli_list_create(scene) ob.dupli_list_create(scene)
return True, [(dob.object, dob.matrix) for dob in ob.dupli_list] return True, [(dob.object, dob.matrix) for dob in ob.dupli_list]
else: else:

View File

@@ -104,7 +104,7 @@ class Collection(bpy_types.ID):
"""The collection instance objects this collection is used in""" """The collection instance objects this collection is used in"""
import bpy import bpy
return tuple(obj for obj in bpy.data.objects return tuple(obj for obj in bpy.data.objects
if self == obj.dupli_group) if self == obj.instance_collection)
class Object(bpy_types.ID): class Object(bpy_types.ID):

View File

@@ -640,10 +640,10 @@ class MakeDupliFace(Operator):
for obj in objects: for obj in objects:
scene.objects.unlink(obj) scene.objects.unlink(obj)
ob_new.dupli_type = 'FACES' ob_new.instance_type = 'FACES'
ob_inst.parent = ob_new ob_inst.parent = ob_new
ob_new.use_dupli_faces_scale = True ob_new.use_instance_faces_scale = True
ob_new.dupli_faces_scale = 1.0 / SCALE_FAC ob_new.instance_faces_scale = 1.0 / SCALE_FAC
ob_inst.select_set(True) ob_inst.select_set(True)
ob_new.select_set(True) ob_new.select_set(True)
@@ -852,7 +852,7 @@ class TransformsToDeltasAnim(Operator):
class DupliOffsetFromCursor(Operator): class DupliOffsetFromCursor(Operator):
"""Set offset used for collection instances based on cursor position""" """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_label = "Set Offset From Cursor"
bl_options = {'INTERNAL', 'UNDO'} bl_options = {'INTERNAL', 'UNDO'}
@@ -864,7 +864,7 @@ class DupliOffsetFromCursor(Operator):
scene = context.scene scene = context.scene
collection = context.collection collection = context.collection
collection.dupli_offset = scene.cursor_location collection.instance_offset = scene.cursor_location
return {'FINISHED'} return {'FINISHED'}

View File

@@ -47,7 +47,7 @@ class CopyRigidbodySettings(Operator):
"deactivate_angular_velocity", "deactivate_angular_velocity",
"linear_damping", "linear_damping",
"angular_damping", "angular_damping",
"collision_groups", "collision_collections",
"mesh_source", "mesh_source",
"use_deform", "use_deform",
"enabled", "enabled",

View File

@@ -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_visibility", text="Visibility", toggle=True)
row.prop(lineset, "select_by_edge_types", text="Edge Types", 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_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) row.prop(lineset, "select_by_image_border", text="Image Border", toggle=True)
if lineset.select_by_visibility: 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_negation", expand=True)
row.prop(lineset, "face_mark_condition", expand=True) row.prop(lineset, "face_mark_condition", expand=True)
if lineset.select_by_group: if lineset.select_by_collection:
col.label(text="Group:") col.label(text="Collection:")
row = col.row() row = col.row()
row.prop(lineset, "group", text="") row.prop(lineset, "collection", text="")
row.prop(lineset, "group_negation", expand=True) row.prop(lineset, "collection_negation", expand=True)
class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Panel): class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Panel):

View File

@@ -176,7 +176,7 @@ class COLLECTION_MT_specials(Menu):
layout.operator("object.collection_unlink", icon='X') layout.operator("object.collection_unlink", icon='X')
layout.operator("object.collection_objects_select") 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): 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.menu("COLLECTION_MT_specials", icon='DOWNARROW_HLT', text="")
row = col.box().row() row = col.box().row()
row.prop(collection, "dupli_offset", text="") row.prop(collection, "instance_offset", text="")
class OBJECT_PT_display(ObjectButtonsPanel, Panel): 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_geometry = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'})
is_wire = (obj_type in {'CAMERA', 'EMPTY'}) is_wire = (obj_type in {'CAMERA', 'EMPTY'})
is_empty_image = (obj_type == 'EMPTY' and obj.empty_display_type == 'IMAGE') 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 = flow.column()
col.prop(obj, "show_name", text="Name") col.prop(obj, "show_name", text="Name")
@@ -288,42 +288,42 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
ob = context.object ob = context.object
row = layout.row() row = layout.row()
row.prop(ob, "dupli_type", expand=True) row.prop(ob, "instance_type", expand=True)
layout.use_property_split = True layout.use_property_split = True
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) 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 = flow.column(align=True)
col.prop(ob, "dupli_frames_start", text="Start") col.prop(ob, "instance_frames_start", text="Start")
col.prop(ob, "dupli_frames_end", text="End") col.prop(ob, "instance_frames_end", text="End")
col = flow.column(align=True) col = flow.column(align=True)
col.prop(ob, "dupli_frames_on", text="On") col.prop(ob, "instance_frames_on", text="On")
col.prop(ob, "dupli_frames_off", text="Off") col.prop(ob, "instance_frames_off", text="Off")
col = flow.column(align=True) 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': elif ob.instance_type == 'VERTS':
layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation") layout.prop(ob, "use_instance_vertices_rotation", text="Rotation")
elif ob.dupli_type == 'FACES': elif ob.instance_type == 'FACES':
col = flow.column() 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 = col.column()
sub.active = ob.use_dupli_faces_scale sub.active = ob.use_instance_faces_scale
sub.prop(ob, "dupli_faces_scale", text="Inherit Scale") sub.prop(ob, "instance_faces_scale", text="Inherit Scale")
elif ob.dupli_type == 'COLLECTION': elif ob.instance_type == 'COLLECTION':
col = flow.column() 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 = flow.column(align=True)
col.prop(ob, "show_duplicator_for_viewport") col.prop(ob, "show_instancer_for_viewport")
col.prop(ob, "show_duplicator_for_render") col.prop(ob, "show_instancer_for_render")
from .properties_animviz import ( from .properties_animviz import (

View File

@@ -879,7 +879,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel):
layout.separator() layout.separator()
layout.prop(part, "collision_group") layout.prop(part, "collision_collection")
class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): 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_size_deflect")
col.prop(part, "use_die_on_collision") col.prop(part, "use_die_on_collision")
col.prop(part, "collision_group") col.prop(part, "collision_collection")
class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel):
@@ -1229,7 +1229,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
if context.object: if context.object:
layout.separator() 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): class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel):
@@ -1366,11 +1366,11 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel):
col = layout.column() col = layout.column()
col.prop(part, "dupli_object", text="Instance Object") col.prop(part, "instance_object", text="Instance Object")
sub = col.column() sub = col.column()
sub.prop(part, "use_global_dupli", text="Global Coordinates") sub.prop(part, "use_global_instance", text="Global Coordinates")
sub.prop(part, "use_rotation_dupli", text="Object Rotation") sub.prop(part, "use_rotation_instance", text="Object Rotation")
sub.prop(part, "use_scale_dupli", text="Object Scale") sub.prop(part, "use_scale_instance", text="Object Scale")
class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel):
@@ -1392,15 +1392,15 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel):
col = layout.column() 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 = col.column()
sub.active = (part.use_whole_group is False) sub.active = (part.use_whole_collection is False)
sub.prop(part, "use_group_pick_random") sub.prop(part, "use_collection_pick_random")
sub.prop(part, "use_global_dupli", text="Global Coordinates") sub.prop(part, "use_global_instance", text="Global Coordinates")
sub.prop(part, "use_rotation_dupli", text="Object Rotation") sub.prop(part, "use_rotation_instance", text="Object Rotation")
sub.prop(part, "use_scale_dupli", text="Object Scale") sub.prop(part, "use_scale_instance", text="Object Scale")
class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): 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 layout = self.layout
part = particle_get_settings(context) 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): def draw(self, context):
layout = self.layout layout = self.layout
@@ -1430,11 +1430,11 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
col = layout.column() 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 = layout.row()
row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights", row.template_list("UI_UL_list", "particle_instance_weights", part, "instance_weights",
part, "active_dupliweight_index") part, "active_instanceweight_index")
col = row.column() col = row.column()
sub = col.row() sub = col.row()
@@ -1446,7 +1446,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
subsub.separator() subsub.separator()
subsub.operator("particle.dupliob_refresh", icon='FILE_REFRESH', text="") subsub.operator("particle.dupliob_refresh", icon='FILE_REFRESH', text="")
weight = part.active_dupliweight weight = part.active_instanceweight
if weight: if weight:
row = layout.row() row = layout.row()
row.prop(weight, "count") row.prop(weight, "count")
@@ -1635,7 +1635,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
if context.object: if context.object:
layout.separator() 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): class PARTICLE_PT_children(ParticleButtonsPanel, Panel):

View File

@@ -273,7 +273,7 @@ class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel):
col.prop(cloth, "impulse_clamp") col.prop(cloth, "impulse_clamp")
col = flow.column() col = flow.column()
col.prop(cloth, "group") col.prop(cloth, "collection")
class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel):

View File

@@ -242,7 +242,7 @@ def effector_weights_ui(self, context, weights, weight_type):
# NOTE: TODO temporarly used until the animate properties are properly skipped. # NOTE: TODO temporarly used until the animate properties are properly skipped.
layout.use_property_decorate = False # No animation (remove this later on). 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) flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)

View File

@@ -260,7 +260,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
col.separator() col.separator()
col = flow.column() col = flow.column()
col.prop(surface, "brush_group") col.prop(surface, "brush_collection")
if surface_type not in {'DISPLACE', 'WAVE'}: if surface_type not in {'DISPLACE', 'WAVE'}:
col = flow.column() # flow the layout otherwise. col = flow.column() # flow the layout otherwise.

View File

@@ -191,7 +191,7 @@ class PHYSICS_PT_rigid_body_collisions_collections(PHYSICS_PT_rigidbody_panel, P
ob = context.object ob = context.object
rbo = ob.rigid_body 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): class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):

View File

@@ -487,11 +487,11 @@ class PHYSICS_PT_smoke_collections(PhysicButtonsPanel, Panel):
domain = context.smoke.domain_settings domain = context.smoke.domain_settings
col = layout.column() col = layout.column()
col.prop(domain, "fluid_group", text="Flow") col.prop(domain, "fluid_collection", text="Flow")
# col = layout.column() # col = layout.column()
# col.prop(domain, "effector_group", text="Effector") # col.prop(domain, "effector_collection", text="Effector")
col.prop(domain, "collision_group", text="Collision") col.prop(domain, "collision_collection", text="Collision")
class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):

View File

@@ -56,7 +56,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
md = context.soft_body md = context.soft_body
softbody = md.settings softbody = md.settings
layout.prop(softbody, "collision_group") layout.prop(softbody, "collision_collection")
class PHYSICS_PT_softbody_object(PhysicButtonsPanel, Panel): class PHYSICS_PT_softbody_object(PhysicButtonsPanel, Panel):

View File

@@ -400,7 +400,7 @@ class SCENE_PT_rigid_body_world_settings(SceneButtonsPanel, Panel):
col.active = rbw.enabled col.active = rbw.enabled
col = col.column() col = col.column()
col.prop(rbw, "group") col.prop(rbw, "collection")
col.prop(rbw, "constraints") col.prop(rbw, "constraints")
col = col.column() col = col.column()

View File

@@ -23,7 +23,7 @@ def main(context, event):
if obj.type == 'MESH': if obj.type == 'MESH':
yield (obj, obj.matrix_world.copy()) yield (obj, obj.matrix_world.copy())
if obj.dupli_type != 'NONE': if obj.instance_type != 'NONE':
obj.dupli_list_create(scene) obj.dupli_list_create(scene)
for dob in obj.dupli_list: for dob in obj.dupli_list:
obj_dupli = dob.object obj_dupli = dob.object

View File

@@ -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) static void node_shader_buts_tex_coord(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{ {
uiItemR(layout, ptr, "object", 0, NULL, 0); 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) 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) 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"); PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) { if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {

View File

@@ -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_ui_text(prop, "Self Friction", "Friction with self contact");
RNA_def_property_update(prop, 0, "rna_cloth_update"); 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_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"); RNA_def_property_update(prop, 0, "rna_cloth_dependency_update");
prop = RNA_def_property(srna, "vertex_group_self_collisions", PROP_STRING, PROP_NONE); prop = RNA_def_property(srna, "vertex_group_self_collisions", PROP_STRING, PROP_NONE);

View File

@@ -309,15 +309,16 @@ void RNA_def_collections(BlenderRNA *brna)
PropertyRNA *prop; PropertyRNA *prop;
srna = RNA_def_struct(brna, "Collection", "ID"); 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_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_text(srna, "Collection", "Collection of Object data-blocks");
RNA_def_struct_ui_icon(srna, ICON_GROUP); 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 */ /* 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); 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_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_ui_range(prop, -10000.0, 10000.0, 10, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);

View File

@@ -424,8 +424,9 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT, "rna_DynamicPaintSurface_uniqueName"); RNA_def_property_update(prop, NC_OBJECT, "rna_DynamicPaintSurface_uniqueName");
RNA_def_struct_name_property(srna, prop); 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_struct_type(prop, "Collection");
RNA_def_property_pointer_sdna(prop, NULL, "brush_group");
RNA_def_property_flag(prop, PROP_EDITABLE); 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_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"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_reset_dependency");

View File

@@ -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_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"); 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_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_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
} }
@@ -4355,9 +4355,9 @@ static void def_sh_uvmap(StructRNA *srna)
{ {
PropertyRNA *prop; 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_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_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeShaderUVMap", "storage"); RNA_def_struct_sdna_from(srna, "NodeShaderUVMap", "storage");

View File

@@ -134,27 +134,27 @@ static const EnumPropertyItem parent_type_items[] = {
{0, NULL, 0, NULL, NULL} {0, NULL, 0, NULL, NULL}
}; };
#define DUPLI_ITEMS_SHARED \ #define INSTANCE_ITEMS_SHARED \
{0, "NONE", 0, "None", ""}, \ {0, "NONE", 0, "None", ""}, \
{OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"}, \ {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make copy of object for every frame"}, \
{OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices"}, \ {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Duplicate child objects on all vertices"}, \
{OB_DUPLIFACES, "FACES", 0, "Faces", "Duplicate child objects on all faces"} {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"} {OB_DUPLICOLLECTION, "COLLECTION", 0, "Collection", "Enable collection instancing"}
static const EnumPropertyItem dupli_items[] = { static const EnumPropertyItem instance_items[] = {
DUPLI_ITEMS_SHARED, INSTANCE_ITEMS_SHARED,
DUPLI_ITEM_COLLECTION, INSTANCE_ITEM_COLLECTION,
{0, NULL, 0, NULL, NULL} {0, NULL, 0, NULL, NULL}
}; };
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
static EnumPropertyItem dupli_items_nogroup[] = { static EnumPropertyItem instance_items_nogroup[] = {
DUPLI_ITEMS_SHARED, INSTANCE_ITEMS_SHARED,
{0, NULL, 0, NULL, NULL} {0, NULL, 0, NULL, NULL}
}; };
#endif #endif
#undef DUPLI_ITEMS_SHARED #undef INSTANCE_ITEMS_SHARED
#undef DUPLI_ITEM_COLLECTION #undef INSTANCE_ITEM_COLLECTION
const EnumPropertyItem rna_enum_metaelem_type_items[] = { const EnumPropertyItem rna_enum_metaelem_type_items[] = {
{MB_BALL, "BALL", ICON_META_BALL, "Ball", ""}, {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); 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, bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{ {
@@ -527,16 +527,16 @@ static const EnumPropertyItem *rna_Object_dupli_type_itemf(
const EnumPropertyItem *item; const EnumPropertyItem *item;
if (ob->type == OB_EMPTY) { if (ob->type == OB_EMPTY) {
item = dupli_items; item = instance_items;
} }
else { else {
item = dupli_items_nogroup; item = instance_items_nogroup;
} }
return item; 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; Object *ob = (Object *)ptr->data;
Collection *grp = (Collection *)value.data; Collection *grp = (Collection *)value.data;
@@ -557,7 +557,7 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value)
} }
else { else {
BKE_report(NULL, RPT_ERROR, 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_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, rna_enum_object_axis_items); RNA_def_property_enum_items(prop, rna_enum_object_axis_items);
RNA_def_property_ui_text(prop, "Track Axis", 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)"); "parent 'Follow' is enabled)");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); 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_sdna(prop, NULL, "upflag");
RNA_def_property_enum_items(prop, up_items); RNA_def_property_enum_items(prop, up_items);
RNA_def_property_ui_text(prop, "Up Axis", 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)"); "parent 'Follow' is enabled)");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); 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); prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls"); 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"); RNA_def_property_ui_text(prop, "Proxy Collection", "Library collection duplicator object this proxy object controls");
/* materials */ /* 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_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1);
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_hide_update"); 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_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_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 */ /* anim */
rna_def_animdata_common(srna); 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"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update");
/* duplicates */ /* 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_bitflag_sdna(prop, NULL, "transflag");
RNA_def_property_enum_items(prop, dupli_items); RNA_def_property_enum_items(prop, instance_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_dupli_type_itemf"); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_instance_type_itemf");
RNA_def_property_ui_text(prop, "Dupli Type", "If not None, object duplication method to use"); 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"); 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_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"); "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"); 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_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_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); 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_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"); 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_float_sdna(prop, NULL, "dupfacesca");
RNA_def_property_range(prop, 0.001f, 10000.0f); 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"); 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_struct_type(prop, "Collection");
RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_group_set", NULL, NULL); RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_collection_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Dupli Collection", "Instance an existing collection"); 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"); 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_int_sdna(prop, NULL, "dupsta");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME); 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"); 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_int_sdna(prop, NULL, "dupend");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME); 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"); 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_int_sdna(prop, NULL, "dupon");
RNA_def_property_range(prop, 1, MAXFRAME); RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_range(prop, 1, 1500, 1, -1); 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"); 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_int_sdna(prop, NULL, "dupoff");
RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_range(prop, 0, 1500, 1, -1); 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"); 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_boolean_sdna(prop, NULL, "transflag", OB_DUPLI);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); 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); RNA_def_property_ui_text(prop, "Dynamic Topology Sculpting", NULL);
/* Base Settings */ /* 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_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_ui_text(prop, "Base from Duplicator", "Object comes from a duplicator");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_clear_flag(prop, PROP_EDITABLE);

View File

@@ -994,8 +994,9 @@ static void rna_def_effector_weight(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update"); RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
/* General */ /* 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_struct_type(prop, "Collection");
RNA_def_property_pointer_sdna(prop, NULL, "group");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Collection", "Limit effectors to this collection"); RNA_def_property_ui_text(prop, "Effector Collection", "Limit effectors to this collection");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update"); 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_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision");
RNA_def_property_update(prop, 0, "rna_softbody_update"); 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_struct_type(prop, "Collection");
RNA_def_property_pointer_sdna(prop, NULL, "collision_group");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection"); RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection");
RNA_def_property_update(prop, 0, "rna_softbody_dependency_update"); RNA_def_property_update(prop, 0, "rna_softbody_dependency_update");

View File

@@ -1562,7 +1562,7 @@ static void rna_def_particle_dupliweight(BlenderRNA *brna)
PropertyRNA *prop; PropertyRNA *prop;
srna = RNA_def_struct(brna, "ParticleDupliWeight", NULL); 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"); RNA_def_struct_sdna(srna, "ParticleDupliWeight");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); 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_ui_text(prop, "Number", "Show particle number");
RNA_def_property_update(prop, 0, "rna_Particle_redo"); 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_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"); 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_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_ui_text(prop, "Use Count", "Use object multiple times in the same collection");
RNA_def_property_update(prop, 0, "rna_Particle_redo_count"); 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_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_ui_text(prop, "Global", "Use object's global coordinates for duplication");
RNA_def_property_update(prop, 0, "rna_Particle_redo"); 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_boolean_sdna(prop, NULL, "draw", PART_DRAW_ROTATE_OB);
RNA_def_property_ui_text(prop, "Rotation", RNA_def_property_ui_text(prop, "Rotation",
"Use object's rotation for duplication (global x-axis is aligned " "Use object's rotation for duplication (global x-axis is aligned "
"particle rotation axis)"); "particle rotation axis)");
RNA_def_property_update(prop, 0, "rna_Particle_redo"); 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_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_ui_text(prop, "Scale", "Use object's scale for duplication");
RNA_def_property_update(prop, 0, "rna_Particle_redo"); 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_ui_text(prop, "Speed", "Multiply line length by particle speed");
RNA_def_property_update(prop, 0, "rna_Particle_redo"); 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_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"); RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop = RNA_def_property(srna, "use_strand_primitive", PROP_BOOLEAN, PROP_NONE); 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_ui_text(prop, "Random Size", "Give the particle size a random variation");
RNA_def_property_update(prop, 0, "rna_Particle_reset"); 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_struct_type(prop, "Collection");
RNA_def_property_pointer_sdna(prop, NULL, "collision_group");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection"); RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection");
RNA_def_property_update(prop, 0, "rna_Particle_reset_dependency"); 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)"); "(must use same subsurf level for viewport and render for correct results)");
RNA_def_property_update(prop, 0, "rna_Particle_change_type"); RNA_def_property_update(prop, 0, "rna_Particle_change_type");
/* draw objects & groups */ /* draw objects & collections */
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_pointer_sdna(prop, NULL, "dup_group"); RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_struct_type(prop, "Collection");
RNA_def_property_flag(prop, PROP_EDITABLE); 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_ui_text(prop, "Dupli Collection", "Show Objects in this collection in place of particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo_count"); 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_collection_sdna(prop, NULL, "dupliweights", NULL);
RNA_def_property_struct_type(prop, "ParticleDupliWeight"); 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_struct_type(prop, "ParticleDupliWeight");
RNA_def_property_pointer_funcs(prop, "rna_ParticleDupliWeight_active_get", NULL, NULL, NULL); RNA_def_property_pointer_funcs(prop, "rna_ParticleDupliWeight_active_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Dupli Object", ""); 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_def_property_int_funcs(prop, "rna_ParticleDupliWeight_active_index_get",
"rna_ParticleDupliWeight_active_index_set", "rna_ParticleDupliWeight_active_index_set",
"rna_ParticleDupliWeight_active_index_range"); "rna_ParticleDupliWeight_active_index_range");
RNA_def_property_ui_text(prop, "Active Dupli Object Index", ""); 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_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object"); RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE); 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"); RNA_def_property_update(prop, 0, "rna_Particle_redo_dependency");
prop = RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE); prop = RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);

View File

@@ -267,7 +267,7 @@ static void rna_RigidBodyOb_collision_margin_set(PointerRNA *ptr, float value)
#endif #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; RigidBodyOb *rbo = (RigidBodyOb *)ptr->data;
int i; int i;
@@ -768,8 +768,9 @@ static void rna_def_rigidbody_world(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_RigidBodyWorld_path"); RNA_def_struct_path_func(srna, "rna_RigidBodyWorld_path");
/* groups */ /* 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_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_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_ui_text(prop, "Collection", "Collection containing objects participating in this simulation");
RNA_def_property_update(prop, NC_SCENE, "rna_RigidBodyWorld_reset"); 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)"); "(best results when non-zero)");
RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_shape_reset"); 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_boolean_sdna(prop, NULL, "col_groups", 1);
RNA_def_property_array(prop, 20); 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_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_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);

View File

@@ -3384,7 +3384,7 @@ void rna_def_freestyle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL} {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"}, {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging to some object in the group"},
{FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive", {FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive",
"Select feature edges not belonging to any object in the group"}, "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_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"); 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_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"); 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); 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"); "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"); 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_pointer_sdna(prop, NULL, "group");
RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_struct_type(prop, "Collection");
RNA_def_property_flag(prop, PROP_EDITABLE); 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_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"); 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_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", RNA_def_property_ui_text(prop, "Collection Negation",
"Specify either inclusion or exclusion of feature edges belonging to a collection of objects"); "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"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");

View File

@@ -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)"); "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"); 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_pointer_sdna(prop, NULL, "coll_group");
RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_struct_type(prop, "Collection");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Collision Collection", "Limit collisions to this collection"); 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"); 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_pointer_sdna(prop, NULL, "fluid_group");
RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_struct_type(prop, "Collection");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Fluid Collection", "Limit fluid objects to this collection"); 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"); 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_pointer_sdna(prop, NULL, "eff_group");
RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_struct_type(prop, "Collection");
RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_EDITABLE);

View File

@@ -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_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_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_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_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_LA, "LIGHT", ICON_LIGHT_DATA, "Lights", "Show/hide Light data-blocks"},
{FILTER_ID_LS, "LINESTYLE", ICON_LINE_DATA, {FILTER_ID_LS, "LINESTYLE", ICON_LINE_DATA,
@@ -4365,7 +4365,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{FILTER_ID_AC, {FILTER_ID_AC,
"ANIMATION", ICON_ANIM_DATA, "Animations", "Show/hide animation data"}, "ANIMATION", ICON_ANIM_DATA, "Animations", "Show/hide animation data"},
{FILTER_ID_OB | FILTER_ID_GR, {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, {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"}, "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, {FILTER_ID_LS | FILTER_ID_MA | FILTER_ID_NT | FILTER_ID_TE,