def invoke(self, context, event): obj_bp = utils.get_parent_assembly_bp(context.object) if obj_bp: self.assembly_name = obj_bp.mv.name_object wm = context.window_manager return wm.invoke_props_dialog(self, width=utils.get_prop_dialog_width(400))
def poll(cls, context): obj = context.active_object obj_bp = utils.get_parent_assembly_bp(obj) if obj_bp: return True else: return False
def execute(self, context): obj = context.active_object obj_bp = utils.get_parent_assembly_bp(obj) if obj_bp: bpy.ops.object.select_all(action='DESELECT') obj_bp.hide = False obj_bp.hide_select = False obj_bp.select = True context.scene.objects.active = obj_bp return {'FINISHED'}
def execute(self, context): obj_bp = utils.get_parent_assembly_bp(context.object) if obj_bp: list_obj = utils.get_child_objects(obj_bp) for obj in list_obj: obj.hide = False obj.hide_select = False obj.select = True bpy.ops.group.create(name=self.assembly_name) obj_bp.location = obj_bp.location return {'FINISHED'}
def execute(self, context): obj_bools = [] obj = context.object obj_bp = utils.get_parent_assembly_bp(obj) if obj_bp: obj_list = [] obj_list = utils.get_child_objects(obj_bp,obj_list) bpy.ops.object.select_all(action='DESELECT') for obj in obj_list: obj.hide = False obj.select = True bpy.ops.object.duplicate() for obj in context.selected_objects: if obj.type == 'EMPTY': obj.hide = True #COLLECT BOOLEAN OBJECTS FROM GROUP if obj.mv.use_as_bool_obj: obj_bools.append(obj) obj.location = obj.location for obj in obj_list: if obj.type == 'EMPTY': obj.hide = True obj.location = obj.location bpy.ops.object.select_all(action='DESELECT') #ASSIGN BOOLEAN MODIFIERS TO WALL if obj_bp.parent: if obj_bp.parent.mv.type == 'BPWALL': wall = fd_types.Wall(obj_bp.parent) mesh = wall.get_wall_mesh() for obj_bool in obj_bools: mod = mesh.modifiers.new(obj_bool.name,'BOOLEAN') mod.object = obj_bool mod.operation = 'DIFFERENCE' obj_bp.select = True context.scene.objects.active = obj_bp return {'FINISHED'}
def invoke(self,context,event): obj_bp = utils.get_parent_assembly_bp(context.object) if obj_bp: self.assembly_name = obj_bp.mv.name_object wm = context.window_manager return wm.invoke_props_dialog(self, width=utils.get_prop_dialog_width(400))
def poll(cls, context): obj_bp = utils.get_parent_assembly_bp(context.object) if obj_bp: return True else: return False
def get_bp(self, context): if self.object_name != "": return bpy.data.objects[self.object_name] else: obj = context.object return utils.get_parent_assembly_bp(obj)