Page MenuHome

UI: Add custom properties panel to materials
Closed, ResolvedPublic


This panel must be visible for grease pencil materials too.


To Do

Event Timeline

Antonio Vazquez (antoniov) renamed this task from UI: Addd custom properties panel to materials to UI: Add custom properties panel to materials.

Note that Grease Pencil Object Data should also have custom properties

Bastien Montagne (mont29) triaged this task as Normal priority.Jul 20 2018, 2:49 PM

@Joshua Leung (aligorith) Could you take a look of this?

I tried this (adding the corresponding import of PropertyPanel), but the add button is missing in the panel

class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, PropertyPanel, Panel):
  _context_path = "material"
  _property_type = bpy.types.Material

Do you know why?

@Joshua Leung (aligorith) Looking at the python code I have found the problem is is in function rna_idprop_context_value . The problem is that eval("context." + context_member) always returns None.

Why? no idea.

Antonio Vazquez (antoniov) claimed this task.

The problem was here:

_context_path = "object.active_material"