2
$\begingroup$

Where does this neat control come from?

enter image description here

I noticed it on materials from Poliigon Material converter. Never seen it before. (I am new to Blender though.) The control does not get preserved when I clone the material. (I could not find anything missing or anything extra in the Shading editor when comparing the original and the cloned material.)

$\endgroup$

1 Answer 1

4
$\begingroup$

The Add-on is responsible for adding this field there. But it only gets drawn if a special property, managed by the add-on, is present in the material properties. These custom properties don't get copied over when you duplicate a material.

Basically this is just a shortcut to the scale values of a mapping node inside the material. I think it is a bit convoluted for what it does, but you should contact the support if you want to make them aware of this limitation.

Digging into the add-on files I found this:

if mat and mat.pmc_matprops.workflow != '':

        # get the mapping nodes, if found
        main_map = None
        for n in mat.node_tree.nodes:
            if 'main_map' in n: # ie n['main_map'] exists
                main_map = n

        if main_map:
            row = col.row(align=True)
            if hasattr(main_map, "scale"):
                row.prop(main_map,"scale", text="Main scale")
            elif 'Scale' in main_map.inputs:
                row.prop(main_map.inputs['Scale'], "default_value", text="Main scale")

Explanation :

On the first line the method checks if the material has a custom property named pmc_matprops. I believe it is added by the add-on when first instantiating the material. When you duplicate the material, the property doesn't get copied over.

$\endgroup$
2
  • $\begingroup$ Would you say the problem is Blender not copying their special property, or Polligon not having it declared as an actual Custom Property? (I am referring to the bottom most section of the material pane.) $\endgroup$ Commented Mar 12, 2021 at 12:35
  • 1
    $\begingroup$ The problem is Blender not automatically copying custom properties. It's true for any object and custom property. You could use a script to automatically copy custom properties from material to material, but in this case I think it could be handled in the add-on with a few lines (adding a button to "initialize" the custom props if they don't exist yet on the material for instance) $\endgroup$
    – Gorgious
    Commented Mar 12, 2021 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .