Man Creates Real Life Cookie - It's Not What You Think (Must Read)

No items found.

Spoiler alert, this is not actually a blog post about a man creating a real life cookie with an amusing twist at the end, I'm just using it to test how blog posts will be written and stuff like that. Spoiler alert but that's life, a series of cookie related promises followed by unsympathetic disappointment and, spoiler alert, no cookies.

Remove duplicate objects

Here is a code snippet showing how to remove duplicate objects in blender using python - this is mainly to test out styling code snippets in the blog posts

import bpy

#get all scene objects
objs = [i for i in bpy.data.scenes[0].objects if i.type == 'MESH']

for i in objs:
    #check for objects that have one material
    if len(i.material_slots)==1:
        dupmat = i.material_slots[0].name
        print(dupmat)
        #check for duplicate names
        if ".0" in dupmat:
            matName = dupmat[:-4]
            if matName in [i.name for i in bpy.data.materials]:
                mat = bpy.data.materials[dupmat[:-4]]
                i.material_slots[0].material = mat
    
    #check for objects that have more than one material
    elif len(i.material_slots)>1:
        for x,y in enumerate(i.material_slots):
            dupmat = i.material_slots[x].name
            print(dupmat)
            if ".0" in dupmat:
                matName = dupmat[:-4]
                if matName in [i.name for i in bpy.data.materials]:
                    mat = bpy.data.materials[dupmat[:-4]]
                    i.material_slots[x].material = mat

Here's an embedded map of the Brighton Window and Gutter Cleaning services provided by someone in Brighton.

Notice how the corners of the code block are very sharp and therefore not rounded? This is not what I intended, the code block should inherit the style of a styled code block which has the following properties:

  • Rounded corners
  • Drop shadow

This tells me that the styling does not work for code blocks in CMS content. What does this tell us?

Code blocks do not inherit styling from the Rich Text Editor when used in CMS content without custom CSS
No items found.

Notice that image gallery positioned between various portions of this blog post's body text?

Further examples of this can be found in the following study by Zongker et al. 2002 which outlines an important use case and should not be ignored.

Vivamus vitae arcu vel velit efficitur vestibulum vel in purus. Vivamus vitae arcu vel velit efficitur vestibulum vel in purus. Sed auctor augue id tellus lacinia, nec ultricies est fermentum.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae. Sed auctor augue id tellus lacinia, nec ultricies est fermentum.

Zongker, D et al. "Chicken Chicken Chicken: Chicken Chicken." Department of Computer Science and Engineering, University of Washington. 2002

Here is an image inserted via the CMS editor

Image of a woman cutting the hair of a non-descript man who has partially adopted the body of a man with an ostentatious watch while partially adopting the remaining part of the body of a man cutting the hair of a kind of monkey
No items found.

Above this paragraph is a gallery showing various doodles by me. The images are generally similar in size but in cases where a certain rows contain less images than other rows, images are expanded to fill the gaps.

And yeah that's pretty much it, hope you enjoyed my blog post and all the various code snippets, of which there were very few which is not necessarily a bad thing, don't you agree?

Here is an example of an in-line image. Anyway,

I personally find that large swathes of text in code format are sometimes hard to read but sometimes large swathes of text written in code snippet format can be a pleasant thing to read so it just goes to show there are two sides to every cookie.👍

Huge thanks for reading this.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
dog receiving pat

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

code looks like this

import bpy

#get all scene objects
objs = [i for i in bpy.data.scenes[0].objects if i.type == 'MESH']

for i in objs:
    #check for objects that have one material
    if len(i.material_slots)==1:
        dupmat = i.material_slots[0].name
        print(dupmat)
        #check for duplicate names
        if ".0" in dupmat:
            matName = dupmat[:-4]
            if matName in [i.name for i in bpy.data.materials]:
                mat = bpy.data.materials[dupmat[:-4]]
                i.material_slots[0].material = mat
    
    #check for objects that have more than one material
    elif len(i.material_slots)>1:
        for x,y in enumerate(i.material_slots):
            dupmat = i.material_slots[x].name
            print(dupmat)
            if ".0" in dupmat:
                matName = dupmat[:-4]
                if matName in [i.name for i in bpy.data.materials]:
                    mat = bpy.data.materials[dupmat[:-4]]
                    i.material_slots[x].material = mat

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

testing captions over here
Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript