forked from bartvdbraak/blender
* projection paint options in the toolbar
* renamed __no_header__ -> __show_header__
This commit is contained in:
parent
f4d70c9812
commit
117fdd8072
@ -11,7 +11,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class DATA_PT_context_arm(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_arm"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -11,7 +11,7 @@ class BoneButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class BONE_PT_context_bone(BoneButtonsPanel):
|
||||
__idname__ = "BONE_PT_context_bone"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -11,7 +11,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class DATA_PT_context_camera(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_camera"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -11,7 +11,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class DATA_PT_context_curve(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_curve"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -21,7 +21,7 @@ class DATA_PT_preview(DataButtonsPanel):
|
||||
|
||||
class DATA_PT_context_lamp(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_lamp"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -11,7 +11,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class DATA_PT_context_lattice(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_lattice"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -11,7 +11,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class DATA_PT_context_mesh(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_mesh"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -11,7 +11,7 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class DATA_PT_context_text(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_context_text"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -205,7 +205,7 @@ class WorldButtonsPanel(bpy.types.Panel):
|
||||
return (rd.engine == 'BLENDER_GAME')
|
||||
|
||||
class WORLD_PT_game_context_world(WorldButtonsPanel):
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
|
@ -21,7 +21,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel):
|
||||
|
||||
class MATERIAL_PT_context_material(MaterialButtonsPanel):
|
||||
__idname__= "MATERIAL_PT_context_material"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
return (context.object)
|
||||
|
@ -8,7 +8,7 @@ class ObjectButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class OBJECT_PT_context_object(ObjectButtonsPanel):
|
||||
__idname__ = "OBJECT_PT_context_object"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -20,7 +20,7 @@ class ParticleButtonsPanel(bpy.types.Panel):
|
||||
|
||||
class PARTICLE_PT_particles(ParticleButtonsPanel):
|
||||
__idname__= "PARTICLE_PT_particles"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
return (context.particle_system or context.object)
|
||||
|
@ -34,7 +34,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel):
|
||||
|
||||
class TEXTURE_PT_context_texture(TextureButtonsPanel):
|
||||
__idname__= "TEXTURE_PT_context_texture"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
return (context.material or context.world or context.lamp or context.brush or context.texture)
|
||||
|
@ -20,7 +20,7 @@ class WORLD_PT_preview(WorldButtonsPanel):
|
||||
layout.template_preview(world)
|
||||
|
||||
class WORLD_PT_context_world(WorldButtonsPanel):
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
rd = context.scene.render_data
|
||||
|
@ -171,7 +171,7 @@ class INFO_MT_help(bpy.types.Menu):
|
||||
|
||||
class INFO_PT_tabs(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@ -182,7 +182,7 @@ class INFO_PT_tabs(bpy.types.Panel):
|
||||
class INFO_PT_view(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__label__ = "View"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
userpref = context.user_preferences
|
||||
@ -287,7 +287,7 @@ class INFO_PT_view(bpy.types.Panel):
|
||||
class INFO_PT_edit(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__label__ = "Edit"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
userpref = context.user_preferences
|
||||
@ -385,7 +385,7 @@ class INFO_PT_edit(bpy.types.Panel):
|
||||
class INFO_PT_system(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__label__ = "System"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
userpref = context.user_preferences
|
||||
@ -451,7 +451,7 @@ class INFO_PT_system(bpy.types.Panel):
|
||||
class INFO_PT_filepaths(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__label__ = "File Paths"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
userpref = context.user_preferences
|
||||
@ -510,7 +510,7 @@ class INFO_PT_filepaths(bpy.types.Panel):
|
||||
class INFO_PT_language(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__label__ = "Language"
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def poll(self, context):
|
||||
userpref = context.user_preferences
|
||||
@ -533,7 +533,7 @@ class INFO_PT_language(bpy.types.Panel):
|
||||
class INFO_PT_bottombar(bpy.types.Panel):
|
||||
__space_type__ = "USER_PREFERENCES"
|
||||
__label__ = " "
|
||||
__no_header__ = True
|
||||
__show_header__ = False
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
@ -486,8 +486,19 @@ class VIEW3D_PT_tools_texture_paint(View3DPanel):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.itemL(text="Nothing yet")
|
||||
ipaint = context.tool_settings.image_paint
|
||||
|
||||
col = layout.column()
|
||||
col.itemR(ipaint, "use_projection")
|
||||
col.itemR(ipaint, "use_occlude")
|
||||
col.itemR(ipaint, "use_backface_cull")
|
||||
col.itemR(ipaint, "use_normal_falloff")
|
||||
col.itemR(ipaint, "invert_stencil")
|
||||
col.itemR(ipaint, "use_clone_layer")
|
||||
col.itemR(ipaint, "use_stencil_layer")
|
||||
|
||||
col.itemR(ipaint, "seam_bleed")
|
||||
col.itemR(ipaint, "normal_angle")
|
||||
|
||||
# ********** default tools for particle mode ****************
|
||||
|
||||
|
@ -185,25 +185,25 @@ static void rna_def_image_paint(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_DISABLE);
|
||||
RNA_def_property_ui_text(prop, "Project Paint", "Use projection painting for improved consistency in the brush strokes.");
|
||||
|
||||
prop= RNA_def_property(srna, "occlude", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_XRAY);
|
||||
prop= RNA_def_property(srna, "use_occlude", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_XRAY);
|
||||
RNA_def_property_ui_text(prop, "Occlude", "Only paint onto the faces directly under the brush (slower)");
|
||||
|
||||
prop= RNA_def_property(srna, "cull", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_BACKFACE);
|
||||
prop= RNA_def_property(srna, "use_backface_cull", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_BACKFACE);
|
||||
RNA_def_property_ui_text(prop, "Cull", "Ignore faces pointing away from the view (faster)");
|
||||
|
||||
prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_FLAT);
|
||||
prop= RNA_def_property(srna, "use_normal_falloff", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_FLAT);
|
||||
RNA_def_property_ui_text(prop, "Normal", "Paint most on faces pointing towards the view");
|
||||
|
||||
prop= RNA_def_property(srna, "use_stencil_layer", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_MASK);
|
||||
RNA_def_property_ui_text(prop, "Stencil Layer", "Set the mask layer from the UV layer buttons");
|
||||
|
||||
prop= RNA_def_property(srna, "invert_mask", PROP_BOOLEAN, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "invert_stencil", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_MASK_INV);
|
||||
RNA_def_property_ui_text(prop, "Invert", "Invert the mask");
|
||||
RNA_def_property_ui_text(prop, "Invert", "Invert the stencil layer");
|
||||
|
||||
prop= RNA_def_property(srna, "use_clone_layer", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_CLONE);
|
||||
|
@ -647,8 +647,8 @@ static void rna_def_panel(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_DEFAULT_CLOSED);
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
|
||||
prop= RNA_def_property(srna, "no_header", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_NO_HEADER);
|
||||
prop= RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", PNL_NO_HEADER);
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user