forked from bartvdbraak/blender
A big cleaning patch by Bastien Montagne (thanks a lot!)
* Split and moved Cycles’ render layers panels into the render_layer context as well (would be nice to hide this context when not needed, e.g. with the BGE, but this is not so easy to do nicely...). * Fixed some inconsistencies with trunk (probably due to svn merge glitches) using r52858 as reference. Also recovered the missing release/bin/blender-softwaregl file. * A bunch of style code fixes in Blender's own code (not Freestyle itself yet): line lengths, spaces around operators, block formatting, headers, etc. In rna_linestyle.c, color_blend_items was replaced by ramp_blend_items (exported from rna_material.c).
This commit is contained in:
parent
c9dc80111b
commit
53d845ba69
@ -221,86 +221,6 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
|
||||
sub.prop(rd, "use_persistent_data", text="Persistent Images")
|
||||
|
||||
|
||||
class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Layers"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
|
||||
row = layout.row()
|
||||
row.template_list(rd, "layers", rd.layers, "active_index", rows=2)
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
|
||||
col.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
|
||||
|
||||
row = layout.row()
|
||||
rl = rd.layers.active
|
||||
row.prop(rl, "name")
|
||||
row.prop(rd, "use_single_layer", text="", icon_only=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(scene, "layers", text="Scene")
|
||||
col.prop(rl, "layers_exclude", text="Exclude")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rl, "layers", text="Layer")
|
||||
col.label(text="Mask Layers:")
|
||||
col.prop(rl, "layers_zmask", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Material:")
|
||||
col.prop(rl, "material_override", text="")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rl, "samples")
|
||||
col.prop(rl, "use_sky", "Use Environment")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Passes:")
|
||||
col.prop(rl, "use_pass_combined")
|
||||
col.prop(rl, "use_pass_z")
|
||||
col.prop(rl, "use_pass_normal")
|
||||
col.prop(rl, "use_pass_vector")
|
||||
col.prop(rl, "use_pass_uv")
|
||||
col.prop(rl, "use_pass_object_index")
|
||||
col.prop(rl, "use_pass_material_index")
|
||||
col.prop(rl, "use_pass_ambient_occlusion")
|
||||
col.prop(rl, "use_pass_shadow")
|
||||
|
||||
col = split.column()
|
||||
col.label()
|
||||
col.label(text="Diffuse:")
|
||||
row = col.row(align=True)
|
||||
row.prop(rl, "use_pass_diffuse_direct", text="Direct", toggle=True)
|
||||
row.prop(rl, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
|
||||
row.prop(rl, "use_pass_diffuse_color", text="Color", toggle=True)
|
||||
col.label(text="Glossy:")
|
||||
row = col.row(align=True)
|
||||
row.prop(rl, "use_pass_glossy_direct", text="Direct", toggle=True)
|
||||
row.prop(rl, "use_pass_glossy_indirect", text="Indirect", toggle=True)
|
||||
row.prop(rl, "use_pass_glossy_color", text="Color", toggle=True)
|
||||
col.label(text="Transmission:")
|
||||
row = col.row(align=True)
|
||||
row.prop(rl, "use_pass_transmission_direct", text="Direct", toggle=True)
|
||||
row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
|
||||
row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
|
||||
|
||||
col.prop(rl, "use_pass_emit", text="Emission")
|
||||
col.prop(rl, "use_pass_environment")
|
||||
|
||||
|
||||
class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Post Processing"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@ -359,6 +279,116 @@ class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
|
||||
sub.prop(ccam, "aperture_rotation", text="Rotation")
|
||||
|
||||
|
||||
class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Layers"
|
||||
bl_options = {'HIDE_HEADER'}
|
||||
bl_context = "render_layer"
|
||||
COMPAT_ENGINES = {'CYCLES'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
|
||||
row = layout.row()
|
||||
row.template_list(rd, "layers", rd.layers, "active_index", rows=2)
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
|
||||
col.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
|
||||
|
||||
row = layout.row()
|
||||
rl = rd.layers.active
|
||||
if rl:
|
||||
row.prop(rl, "name")
|
||||
row.prop(rd, "use_single_layer", text="", icon_only=True)
|
||||
|
||||
|
||||
class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Layer"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
bl_context = "render_layer"
|
||||
COMPAT_ENGINES = {'CYCLES'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
rl = rd.layers.active
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(scene, "layers", text="Scene")
|
||||
col.prop(rl, "layers_exclude", text="Exclude")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rl, "layers", text="Layer")
|
||||
col.label(text="Mask Layers:")
|
||||
col.prop(rl, "layers_zmask", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Material:")
|
||||
col.prop(rl, "material_override", text="")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rl, "samples")
|
||||
col.prop(rl, "use_sky", "Use Environment")
|
||||
|
||||
|
||||
class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Layer"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
bl_context = "render_layer"
|
||||
COMPAT_ENGINES = {'CYCLES'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
rl = rd.layers.active
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Passes:")
|
||||
col.prop(rl, "use_pass_combined")
|
||||
col.prop(rl, "use_pass_z")
|
||||
col.prop(rl, "use_pass_normal")
|
||||
col.prop(rl, "use_pass_vector")
|
||||
col.prop(rl, "use_pass_uv")
|
||||
col.prop(rl, "use_pass_object_index")
|
||||
col.prop(rl, "use_pass_material_index")
|
||||
col.prop(rl, "use_pass_ambient_occlusion")
|
||||
col.prop(rl, "use_pass_shadow")
|
||||
|
||||
col = split.column()
|
||||
col.label()
|
||||
col.label(text="Diffuse:")
|
||||
row = col.row(align=True)
|
||||
row.prop(rl, "use_pass_diffuse_direct", text="Direct", toggle=True)
|
||||
row.prop(rl, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
|
||||
row.prop(rl, "use_pass_diffuse_color", text="Color", toggle=True)
|
||||
col.label(text="Glossy:")
|
||||
row = col.row(align=True)
|
||||
row.prop(rl, "use_pass_glossy_direct", text="Direct", toggle=True)
|
||||
row.prop(rl, "use_pass_glossy_indirect", text="Indirect", toggle=True)
|
||||
row.prop(rl, "use_pass_glossy_color", text="Color", toggle=True)
|
||||
col.label(text="Transmission:")
|
||||
row = col.row(align=True)
|
||||
row.prop(rl, "use_pass_transmission_direct", text="Direct", toggle=True)
|
||||
row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
|
||||
row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
|
||||
|
||||
col.prop(rl, "use_pass_emit", text="Emission")
|
||||
col.prop(rl, "use_pass_environment")
|
||||
|
||||
|
||||
class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
|
||||
bl_label = ""
|
||||
bl_context = "material"
|
||||
|
25
release/bin/blender-softwaregl
Normal file
25
release/bin/blender-softwaregl
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
BF_DIST_BIN=`dirname "$0"`
|
||||
BF_PROGRAM="blender" # BF_PROGRAM=`basename "$0"`-bin
|
||||
exitcode=0
|
||||
|
||||
LD_LIBRARY_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH}
|
||||
|
||||
if [ -n "$LD_LIBRARYN32_PATH" ]; then
|
||||
LD_LIBRARYN32_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN32_PATH}
|
||||
fi
|
||||
if [ -n "$LD_LIBRARYN64_PATH" ]; then
|
||||
LD_LIBRARYN64_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN64_PATH}
|
||||
fi
|
||||
if [ -n "$LD_LIBRARY_PATH_64" ]; then
|
||||
LD_LIBRARY_PATH_64=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH_64}
|
||||
fi
|
||||
|
||||
# Workaround for half-transparent windows when compiz is enabled
|
||||
XLIB_SKIP_ARGB_VISUALS=1
|
||||
|
||||
export LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARYN64_PATH LD_LIBRARY_PATH_64 LD_PRELOAD XLIB_SKIP_ARGB_VISUALS
|
||||
|
||||
"$BF_DIST_BIN/$BF_PROGRAM" ${1+"$@"}
|
||||
exitcode=$?
|
||||
exit $exitcode
|
@ -22,14 +22,15 @@ from bpy.props import (EnumProperty, StringProperty)
|
||||
|
||||
|
||||
class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
|
||||
'''Fill the Range Min/Max entries by the min/max distance between selected mesh objects and the source object (either a user-specified object or the active camera)'''
|
||||
'''Fill the Range Min/Max entries by the min/max distance between selected mesh objects and the source object
|
||||
(either a user-specified object or the active camera)'''
|
||||
bl_idname = "scene.freestyle_fill_range_by_selection"
|
||||
bl_label = "Fill Range by Selection"
|
||||
|
||||
type = EnumProperty(name="Type", description="Type of the modifier to work on",
|
||||
items=[("COLOR", "Color", "Color modifier type"),
|
||||
items=(("COLOR", "Color", "Color modifier type"),
|
||||
("ALPHA", "Alpha", "Alpha modifier type"),
|
||||
("THICKNESS", "Thickness", "Thickness modifier type")])
|
||||
("THICKNESS", "Thickness", "Thickness modifier type")))
|
||||
name = StringProperty(name="Name", description="Name of the modifier to work on")
|
||||
|
||||
def execute(self, context):
|
||||
|
@ -106,7 +106,7 @@ add_subdirectory(nodes)
|
||||
add_subdirectory(modifiers)
|
||||
add_subdirectory(makesdna)
|
||||
add_subdirectory(makesrna)
|
||||
ADD_SUBDIRECTORY(freestyle)
|
||||
add_subdirectory(freestyle)
|
||||
|
||||
if(WITH_COMPOSITOR)
|
||||
add_subdirectory(opencl) # later on this may be used more generally
|
||||
|
@ -1,8 +1,4 @@
|
||||
/* BKE_linestyle.h
|
||||
*
|
||||
*
|
||||
* $Id: BKE_particle.h 29187 2010-06-03 15:39:02Z kjym3 $
|
||||
*
|
||||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -29,8 +25,12 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef BKE_LINESTYLE_H
|
||||
#define BKE_LINESTYLE_H
|
||||
#ifndef __BKE_LINESTYLE_H__
|
||||
#define __BKE_LINESTYLE_H__
|
||||
/** \file BKE_linestyle.h
|
||||
* \ingroup bke
|
||||
* \brief Blender kernel freestyle line style functionality.
|
||||
*/
|
||||
|
||||
#include "DNA_linestyle_types.h"
|
||||
|
||||
|
@ -103,7 +103,8 @@ set(SRC
|
||||
intern/lattice.c
|
||||
intern/library.c
|
||||
intern/linestyle.c
|
||||
intern/mask_evaluate.c intern/mask_rasterize.c
|
||||
intern/mask_evaluate.c
|
||||
intern/mask_rasterize.c
|
||||
intern/mask.c
|
||||
intern/material.c
|
||||
intern/mball.c
|
||||
|
@ -762,7 +762,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
|
||||
AnimData *adt = BKE_animdata_from_id(id); \
|
||||
if (adt) func(id, adt, user_data); \
|
||||
} (void)0
|
||||
|
||||
|
||||
/* "embedded" nodetree cases (i.e. scene/material/texture->nodetree) */
|
||||
#define ANIMDATA_NODETREE_IDS_CB(first, NtId_Type) \
|
||||
for (id = first; id; id = id->next) { \
|
||||
@ -774,13 +774,13 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
|
||||
} \
|
||||
if (adt) func(id, adt, user_data); \
|
||||
} (void)0
|
||||
|
||||
|
||||
/* nodes */
|
||||
ANIMDATA_IDS_CB(mainptr->nodetree.first);
|
||||
|
||||
|
||||
/* textures */
|
||||
ANIMDATA_NODETREE_IDS_CB(mainptr->tex.first, Tex);
|
||||
|
||||
|
||||
/* lamps */
|
||||
ANIMDATA_NODETREE_IDS_CB(mainptr->lamp.first, Lamp);
|
||||
|
||||
@ -921,8 +921,8 @@ void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const cha
|
||||
|
||||
/* scenes */
|
||||
RENAMEFIX_ANIM_NODETREE_IDS(mainptr->scene.first, Scene);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* *********************************** */
|
||||
/* KeyingSet API */
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
/* linestyle.c
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@ -28,6 +25,10 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/blenkernel/intern/linestyle.c
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -68,20 +69,21 @@ static const char *modifier_name[LS_MODIFIER_NUM] = {
|
||||
"Guiding Lines",
|
||||
"Blueprint",
|
||||
"2D Offset",
|
||||
"2D Transform"};
|
||||
"2D Transform",
|
||||
};
|
||||
|
||||
static void default_linestyle_settings(FreestyleLineStyle *linestyle)
|
||||
{
|
||||
linestyle->panel = LS_PANEL_STROKES;
|
||||
linestyle->r = linestyle->g = linestyle->b = 0.0;
|
||||
linestyle->alpha = 1.0;
|
||||
linestyle->thickness = 1.0;
|
||||
linestyle->r = linestyle->g = linestyle->b = 0.0f;
|
||||
linestyle->alpha = 1.0f;
|
||||
linestyle->thickness = 1.0f;
|
||||
linestyle->thickness_position = LS_THICKNESS_CENTER;
|
||||
linestyle->thickness_ratio = 0.5f;
|
||||
linestyle->chaining = LS_CHAINING_PLAIN;
|
||||
linestyle->rounds = 3;
|
||||
linestyle->min_angle = 0.0f;
|
||||
linestyle->max_angle = 0.0f;
|
||||
linestyle->min_angle = DEG2RADF(0.0f);
|
||||
linestyle->max_angle = DEG2RADF(0.0f);
|
||||
linestyle->min_length = 0.0f;
|
||||
linestyle->max_length = 10000.0f;
|
||||
linestyle->split_length = 100;
|
||||
@ -104,7 +106,7 @@ FreestyleLineStyle *FRS_new_linestyle(const char *name, struct Main *main)
|
||||
main = G.main;
|
||||
|
||||
linestyle = (FreestyleLineStyle *)BKE_libblock_alloc(&main->linestyle, ID_LS, name);
|
||||
|
||||
|
||||
default_linestyle_settings(linestyle);
|
||||
|
||||
return linestyle;
|
||||
@ -130,7 +132,7 @@ FreestyleLineStyle *FRS_copy_linestyle(FreestyleLineStyle *linestyle)
|
||||
FreestyleLineStyle *new_linestyle;
|
||||
LineStyleModifier *m;
|
||||
|
||||
new_linestyle = FRS_new_linestyle(linestyle->id.name+2, NULL);
|
||||
new_linestyle = FRS_new_linestyle(linestyle->id.name + 2, NULL);
|
||||
FRS_free_linestyle(new_linestyle);
|
||||
|
||||
new_linestyle->r = linestyle->r;
|
||||
@ -164,6 +166,7 @@ FreestyleLineStyle *FRS_copy_linestyle(FreestyleLineStyle *linestyle)
|
||||
FRS_copy_linestyle_thickness_modifier(new_linestyle, m);
|
||||
for (m = (LineStyleModifier *)linestyle->geometry_modifiers.first; m; m = m->next)
|
||||
FRS_copy_linestyle_geometry_modifier(new_linestyle, m);
|
||||
|
||||
return new_linestyle;
|
||||
}
|
||||
|
||||
@ -178,6 +181,7 @@ static LineStyleModifier *new_modifier(int type, size_t size)
|
||||
m->influence = 1.0f;
|
||||
m->flags = LS_MODIFIER_ENABLED | LS_MODIFIER_EXPANDED;
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
@ -207,17 +211,19 @@ static LineStyleModifier *alloc_color_modifier(int type)
|
||||
default:
|
||||
return NULL; /* unknown modifier type */
|
||||
}
|
||||
|
||||
return new_modifier(type, size);
|
||||
}
|
||||
|
||||
LineStyleModifier *FRS_add_linestyle_color_modifier(FreestyleLineStyle *linestyle, int type)
|
||||
{
|
||||
LineStyleModifier *m;
|
||||
|
||||
|
||||
m = alloc_color_modifier(type);
|
||||
if (!m)
|
||||
return NULL;
|
||||
m->blend = MA_RAMP_BLEND;
|
||||
|
||||
switch (type) {
|
||||
case LS_MODIFIER_ALONG_STROKE:
|
||||
((LineStyleColorModifier_AlongStroke *)m)->color_ramp = add_colorband(1);
|
||||
@ -248,13 +254,14 @@ LineStyleModifier *FRS_add_linestyle_color_modifier(FreestyleLineStyle *linestyl
|
||||
LineStyleModifier *FRS_copy_linestyle_color_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m)
|
||||
{
|
||||
LineStyleModifier *new_m;
|
||||
|
||||
|
||||
new_m = alloc_color_modifier(m->type);
|
||||
if (!new_m)
|
||||
return NULL;
|
||||
new_m->influence = m->influence;
|
||||
new_m->flags = m->flags;
|
||||
new_m->blend = m->blend;
|
||||
|
||||
switch (m->type) {
|
||||
case LS_MODIFIER_ALONG_STROKE:
|
||||
{
|
||||
@ -341,11 +348,12 @@ static LineStyleModifier *alloc_alpha_modifier(int type)
|
||||
LineStyleModifier *FRS_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, int type)
|
||||
{
|
||||
LineStyleModifier *m;
|
||||
|
||||
|
||||
m = alloc_alpha_modifier(type);
|
||||
if (!m)
|
||||
return NULL;
|
||||
m->blend = LS_VALUE_BLEND;
|
||||
|
||||
switch (type) {
|
||||
case LS_MODIFIER_ALONG_STROKE:
|
||||
((LineStyleAlphaModifier_AlongStroke *)m)->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
|
||||
@ -376,13 +384,14 @@ LineStyleModifier *FRS_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyl
|
||||
LineStyleModifier *FRS_copy_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, LineStyleModifier *m)
|
||||
{
|
||||
LineStyleModifier *new_m;
|
||||
|
||||
|
||||
new_m = alloc_alpha_modifier(m->type);
|
||||
if (!new_m)
|
||||
return NULL;
|
||||
new_m->influence = m->influence;
|
||||
new_m->flags = m->flags;
|
||||
new_m->blend = m->blend;
|
||||
|
||||
switch (m->type) {
|
||||
case LS_MODIFIER_ALONG_STROKE:
|
||||
{
|
||||
@ -466,6 +475,7 @@ static LineStyleModifier *alloc_thickness_modifier(int type)
|
||||
default:
|
||||
return NULL; /* unknown modifier type */
|
||||
}
|
||||
|
||||
return new_modifier(type, size);
|
||||
}
|
||||
|
||||
@ -477,6 +487,7 @@ LineStyleModifier *FRS_add_linestyle_thickness_modifier(FreestyleLineStyle *line
|
||||
if (!m)
|
||||
return NULL;
|
||||
m->blend = LS_VALUE_BLEND;
|
||||
|
||||
switch (type) {
|
||||
case LS_MODIFIER_ALONG_STROKE:
|
||||
((LineStyleThicknessModifier_AlongStroke *)m)->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
|
||||
@ -527,6 +538,7 @@ LineStyleModifier *FRS_copy_linestyle_thickness_modifier(FreestyleLineStyle *lin
|
||||
new_m->influence = m->influence;
|
||||
new_m->flags = m->flags;
|
||||
new_m->blend = m->blend;
|
||||
|
||||
switch (m->type) {
|
||||
case LS_MODIFIER_ALONG_STROKE:
|
||||
{
|
||||
@ -652,6 +664,7 @@ static LineStyleModifier *alloc_geometry_modifier(int type)
|
||||
default:
|
||||
return NULL; /* unknown modifier type */
|
||||
}
|
||||
|
||||
return new_modifier(type, size);
|
||||
}
|
||||
|
||||
@ -662,70 +675,71 @@ LineStyleModifier *FRS_add_linestyle_geometry_modifier(FreestyleLineStyle *lines
|
||||
m = alloc_geometry_modifier(type);
|
||||
if (!m)
|
||||
return NULL;
|
||||
|
||||
switch (type) {
|
||||
case LS_MODIFIER_SAMPLING:
|
||||
((LineStyleGeometryModifier_Sampling *)m)->sampling = 10.0;
|
||||
((LineStyleGeometryModifier_Sampling *)m)->sampling = 10.0f;
|
||||
break;
|
||||
case LS_MODIFIER_BEZIER_CURVE:
|
||||
((LineStyleGeometryModifier_BezierCurve *)m)->error = 10.0;
|
||||
((LineStyleGeometryModifier_BezierCurve *)m)->error = 10.0f;
|
||||
break;
|
||||
case LS_MODIFIER_SINUS_DISPLACEMENT:
|
||||
((LineStyleGeometryModifier_SinusDisplacement *)m)->wavelength = 20.0;
|
||||
((LineStyleGeometryModifier_SinusDisplacement *)m)->amplitude = 5.0;
|
||||
((LineStyleGeometryModifier_SinusDisplacement *)m)->phase = 0.0;
|
||||
((LineStyleGeometryModifier_SinusDisplacement *)m)->wavelength = 20.0f;
|
||||
((LineStyleGeometryModifier_SinusDisplacement *)m)->amplitude = 5.0f;
|
||||
((LineStyleGeometryModifier_SinusDisplacement *)m)->phase = 0.0f;
|
||||
break;
|
||||
case LS_MODIFIER_SPATIAL_NOISE:
|
||||
((LineStyleGeometryModifier_SpatialNoise *)m)->amplitude = 5.0;
|
||||
((LineStyleGeometryModifier_SpatialNoise *)m)->scale = 20.0;
|
||||
((LineStyleGeometryModifier_SpatialNoise *)m)->amplitude = 5.0f;
|
||||
((LineStyleGeometryModifier_SpatialNoise *)m)->scale = 20.0f;
|
||||
((LineStyleGeometryModifier_SpatialNoise *)m)->octaves = 4;
|
||||
((LineStyleGeometryModifier_SpatialNoise *)m)->flags = LS_MODIFIER_SPATIAL_NOISE_SMOOTH | LS_MODIFIER_SPATIAL_NOISE_PURERANDOM;
|
||||
break;
|
||||
case LS_MODIFIER_PERLIN_NOISE_1D:
|
||||
((LineStyleGeometryModifier_PerlinNoise1D *)m)->frequency = 10.0;
|
||||
((LineStyleGeometryModifier_PerlinNoise1D *)m)->amplitude = 10.0;
|
||||
((LineStyleGeometryModifier_PerlinNoise1D *)m)->frequency = 10.0f;
|
||||
((LineStyleGeometryModifier_PerlinNoise1D *)m)->amplitude = 10.0f;
|
||||
((LineStyleGeometryModifier_PerlinNoise1D *)m)->octaves = 4;
|
||||
((LineStyleGeometryModifier_PerlinNoise1D *)m)->angle = DEG2RADF(45.0f);
|
||||
break;
|
||||
case LS_MODIFIER_PERLIN_NOISE_2D:
|
||||
((LineStyleGeometryModifier_PerlinNoise2D *)m)->frequency = 10.0;
|
||||
((LineStyleGeometryModifier_PerlinNoise2D *)m)->amplitude = 10.0;
|
||||
((LineStyleGeometryModifier_PerlinNoise2D *)m)->frequency = 10.0f;
|
||||
((LineStyleGeometryModifier_PerlinNoise2D *)m)->amplitude = 10.0f;
|
||||
((LineStyleGeometryModifier_PerlinNoise2D *)m)->octaves = 4;
|
||||
((LineStyleGeometryModifier_PerlinNoise2D *)m)->angle = DEG2RADF(45.0f);
|
||||
break;
|
||||
case LS_MODIFIER_BACKBONE_STRETCHER:
|
||||
((LineStyleGeometryModifier_BackboneStretcher *)m)->backbone_length = 10.0;
|
||||
((LineStyleGeometryModifier_BackboneStretcher *)m)->backbone_length = 10.0f;
|
||||
break;
|
||||
case LS_MODIFIER_TIP_REMOVER:
|
||||
((LineStyleGeometryModifier_TipRemover *)m)->tip_length = 10.0;
|
||||
((LineStyleGeometryModifier_TipRemover *)m)->tip_length = 10.0f;
|
||||
break;
|
||||
case LS_MODIFIER_POLYGONIZATION:
|
||||
((LineStyleGeometryModifier_Polygonalization *)m)->error = 10.0;
|
||||
((LineStyleGeometryModifier_Polygonalization *)m)->error = 10.0f;
|
||||
break;
|
||||
case LS_MODIFIER_GUIDING_LINES:
|
||||
((LineStyleGeometryModifier_GuidingLines *)m)->offset = 0.0;
|
||||
((LineStyleGeometryModifier_GuidingLines *)m)->offset = 0.0f;
|
||||
break;
|
||||
case LS_MODIFIER_BLUEPRINT:
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->flags = LS_MODIFIER_BLUEPRINT_CIRCLES;
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->rounds = 1;
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->backbone_length = 10.f;
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->backbone_length = 10.0f;
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->random_radius = 3;
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->random_center = 5;
|
||||
((LineStyleGeometryModifier_Blueprint *)m)->random_backbone = 5;
|
||||
break;
|
||||
case LS_MODIFIER_2D_OFFSET:
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->start = 0.f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->end = 0.f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->x = 0.f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->y = 0.f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->start = 0.0f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->end = 0.0f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->x = 0.0f;
|
||||
((LineStyleGeometryModifier_2DOffset *)m)->y = 0.0f;
|
||||
break;
|
||||
case LS_MODIFIER_2D_TRANSFORM:
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->pivot = LS_MODIFIER_2D_TRANSFORM_PIVOT_CENTER;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->scale_x = 1.f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->scale_y = 1.f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->scale_x = 1.0f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->scale_y = 1.0f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->angle = DEG2RADF(0.0f);
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->pivot_u = 0.5f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->pivot_x = 0.f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->pivot_y = 0.f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->pivot_x = 0.0f;
|
||||
((LineStyleGeometryModifier_2DTransform *)m)->pivot_y = 0.0f;
|
||||
break;
|
||||
default:
|
||||
return NULL; /* unknown modifier type */
|
||||
@ -743,6 +757,7 @@ LineStyleModifier *FRS_copy_linestyle_geometry_modifier(FreestyleLineStyle *line
|
||||
if (!new_m)
|
||||
return NULL;
|
||||
new_m->flags = m->flags;
|
||||
|
||||
switch (m->type) {
|
||||
case LS_MODIFIER_SAMPLING:
|
||||
{
|
||||
@ -947,6 +962,7 @@ void FRS_list_modifier_color_ramps(FreestyleLineStyle *linestyle, ListBase *list
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX Do we want to keep that goto? Or use a boolean var? */
|
||||
char *FRS_path_from_ID_to_color_ramp(FreestyleLineStyle *linestyle, ColorBand *color_ramp)
|
||||
{
|
||||
LineStyleModifier *m;
|
||||
|
@ -288,7 +288,7 @@ void BKE_scene_free(Scene *sce)
|
||||
{
|
||||
Base *base;
|
||||
SceneRenderLayer *srl;
|
||||
|
||||
|
||||
base = sce->base.first;
|
||||
while (base) {
|
||||
base->object->id.us--;
|
||||
|
@ -36,7 +36,6 @@ set(INC
|
||||
set(INC_SYS
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${ZLIB_INC}
|
||||
)
|
||||
|
||||
set(SRC
|
||||
|
@ -431,43 +431,43 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
|
||||
} \
|
||||
} (void)0
|
||||
|
||||
/* do via modifiers instead */
|
||||
/* do via modifiers instead */
|
||||
#if 0
|
||||
if (ob->fluidsimSettings) {
|
||||
rewrite_path_fixed(ob->fluidsimSettings->surfdataPath, visit_cb, absbase, bpath_user_data);
|
||||
}
|
||||
if (ob->fluidsimSettings) {
|
||||
rewrite_path_fixed(ob->fluidsimSettings->surfdataPath, visit_cb, absbase, bpath_user_data);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (md = ob->modifiers.first; md; md = md->next) {
|
||||
if (md->type == eModifierType_Fluidsim) {
|
||||
FluidsimModifierData *fluidmd = (FluidsimModifierData *)md;
|
||||
if (fluidmd->fss) {
|
||||
rewrite_path_fixed(fluidmd->fss->surfdataPath, visit_cb, absbase, bpath_user_data);
|
||||
}
|
||||
}
|
||||
else if (md->type == eModifierType_Smoke) {
|
||||
SmokeModifierData *smd = (SmokeModifierData *)md;
|
||||
if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
|
||||
BPATH_TRAVERSE_POINTCACHE(smd->domain->ptcaches[0]);
|
||||
}
|
||||
}
|
||||
else if (md->type == eModifierType_Cloth) {
|
||||
ClothModifierData *clmd = (ClothModifierData *) md;
|
||||
BPATH_TRAVERSE_POINTCACHE(clmd->ptcaches);
|
||||
}
|
||||
else if (md->type == eModifierType_Ocean) {
|
||||
OceanModifierData *omd = (OceanModifierData *) md;
|
||||
rewrite_path_fixed(omd->cachepath, visit_cb, absbase, bpath_user_data);
|
||||
for (md = ob->modifiers.first; md; md = md->next) {
|
||||
if (md->type == eModifierType_Fluidsim) {
|
||||
FluidsimModifierData *fluidmd = (FluidsimModifierData *)md;
|
||||
if (fluidmd->fss) {
|
||||
rewrite_path_fixed(fluidmd->fss->surfdataPath, visit_cb, absbase, bpath_user_data);
|
||||
}
|
||||
}
|
||||
else if (md->type == eModifierType_Smoke) {
|
||||
SmokeModifierData *smd = (SmokeModifierData *)md;
|
||||
if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
|
||||
BPATH_TRAVERSE_POINTCACHE(smd->domain->ptcaches[0]);
|
||||
}
|
||||
}
|
||||
else if (md->type == eModifierType_Cloth) {
|
||||
ClothModifierData *clmd = (ClothModifierData *) md;
|
||||
BPATH_TRAVERSE_POINTCACHE(clmd->ptcaches);
|
||||
}
|
||||
else if (md->type == eModifierType_Ocean) {
|
||||
OceanModifierData *omd = (OceanModifierData *) md;
|
||||
rewrite_path_fixed(omd->cachepath, visit_cb, absbase, bpath_user_data);
|
||||
}
|
||||
}
|
||||
|
||||
if (ob->soft) {
|
||||
BPATH_TRAVERSE_POINTCACHE(ob->soft->ptcaches);
|
||||
}
|
||||
if (ob->soft) {
|
||||
BPATH_TRAVERSE_POINTCACHE(ob->soft->ptcaches);
|
||||
}
|
||||
|
||||
for (psys = ob->particlesystem.first; psys; psys = psys->next) {
|
||||
BPATH_TRAVERSE_POINTCACHE(psys->ptcaches);
|
||||
}
|
||||
for (psys = ob->particlesystem.first; psys; psys = psys->next) {
|
||||
BPATH_TRAVERSE_POINTCACHE(psys->ptcaches);
|
||||
}
|
||||
|
||||
#undef BPATH_TRAVERSE_POINTCACHE
|
||||
|
||||
@ -511,7 +511,7 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case ID_NT:
|
||||
{
|
||||
|
@ -822,7 +822,7 @@ static void decode_blender_header(FileData *fd)
|
||||
/* is the file saved in a different endian
|
||||
* than we need ?
|
||||
*/
|
||||
if (((((char*)&remove_this_endian_test)[0]==1)?L_ENDIAN:B_ENDIAN) != ((header[8]=='v')?L_ENDIAN:B_ENDIAN)) {
|
||||
if (((((char *)&remove_this_endian_test)[0] == 1) ? L_ENDIAN : B_ENDIAN) != ((header[8] == 'v') ? L_ENDIAN : B_ENDIAN)) {
|
||||
fd->flags |= FD_FLAGS_SWITCH_ENDIAN;
|
||||
}
|
||||
|
||||
@ -944,7 +944,7 @@ static int fd_read_from_memfile(FileData *filedata, void *buffer, unsigned int s
|
||||
if (chunkoffset+readsize > chunk->size)
|
||||
readsize= chunk->size-chunkoffset;
|
||||
|
||||
memcpy((char*)buffer + totread, chunk->buf + chunkoffset, readsize);
|
||||
memcpy((char *)buffer + totread, chunk->buf + chunkoffset, readsize);
|
||||
totread += readsize;
|
||||
filedata->seek += readsize;
|
||||
seek += readsize;
|
||||
@ -986,7 +986,7 @@ static FileData *blo_decode_and_check(FileData *fd, ReportList *reports)
|
||||
blo_freefiledata(fd);
|
||||
fd = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', not a blend file", fd->relabase);
|
||||
blo_freefiledata(fd);
|
||||
@ -1133,7 +1133,7 @@ int BLO_is_a_library(const char *path, char *dir, char *group)
|
||||
/* the last part of the dir is a .blend file, no group follows */
|
||||
*fd = '/'; /* put back the removed slash separating the dir and the .blend file name */
|
||||
}
|
||||
else {
|
||||
else {
|
||||
char *gp = fd + 1; // in case we have a .blend file, gp points to the group
|
||||
|
||||
/* Find the last slash */
|
||||
@ -1842,7 +1842,7 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list)
|
||||
|
||||
for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
|
||||
DRIVER_TARGETS_LOOPER(dvar)
|
||||
{
|
||||
{
|
||||
/* only relink if still used */
|
||||
if (tarIndex < dvar->num_targets)
|
||||
dtar->id = newlibadr(fd, id->lib, dtar->id);
|
||||
@ -2437,7 +2437,7 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
|
||||
/* could be handlerized at some point */
|
||||
if (ntree->type==NTREE_SHADER) {
|
||||
if (node->type==SH_NODE_CURVE_VEC || node->type==SH_NODE_CURVE_RGB) {
|
||||
direct_link_curvemapping(fd, node->storage);
|
||||
direct_link_curvemapping(fd, node->storage);
|
||||
}
|
||||
else if (node->type==SH_NODE_SCRIPT) {
|
||||
NodeShaderScript *nss = (NodeShaderScript *) node->storage;
|
||||
@ -2821,7 +2821,7 @@ static void switch_endian_keyblock(Key *key, KeyBlock *kb)
|
||||
|
||||
cp += 2;
|
||||
}
|
||||
data+= elemsize;
|
||||
data += elemsize;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2856,7 +2856,7 @@ static void lib_link_mball(FileData *fd, Main *main)
|
||||
if (mb->adt) lib_link_animdata(fd, &mb->id, mb->adt);
|
||||
|
||||
for (a = 0; a < mb->totcol; a++)
|
||||
mb->mat[a]= newlibadr_us(fd, mb->id.lib, mb->mat[a]);
|
||||
mb->mat[a] = newlibadr_us(fd, mb->id.lib, mb->mat[a]);
|
||||
|
||||
mb->ipo = newlibadr_us(fd, mb->id.lib, mb->ipo); // XXX deprecated - old animation system
|
||||
|
||||
@ -3045,7 +3045,7 @@ static void direct_link_image(FileData *fd, Image *ima)
|
||||
link_ibuf_list(fd, &ima->ibufs);
|
||||
else
|
||||
ima->ibufs.first = ima->ibufs.last = NULL;
|
||||
|
||||
|
||||
/* if not restored, we keep the binded opengl index */
|
||||
if (ima->ibufs.first == NULL) {
|
||||
ima->bindcode = 0;
|
||||
@ -3093,7 +3093,7 @@ static void lib_link_curve(FileData *fd, Main *main)
|
||||
cu->taperobj = newlibadr(fd, cu->id.lib, cu->taperobj);
|
||||
cu->textoncurve = newlibadr(fd, cu->id.lib, cu->textoncurve);
|
||||
cu->vfont = newlibadr_us(fd, cu->id.lib, cu->vfont);
|
||||
cu->vfontb = newlibadr_us(fd, cu->id.lib, cu->vfontb);
|
||||
cu->vfontb = newlibadr_us(fd, cu->id.lib, cu->vfontb);
|
||||
cu->vfonti = newlibadr_us(fd, cu->id.lib, cu->vfonti);
|
||||
cu->vfontbi = newlibadr_us(fd, cu->id.lib, cu->vfontbi);
|
||||
|
||||
@ -3127,7 +3127,7 @@ static void direct_link_curve(FileData *fd, Curve *cu)
|
||||
cu->mat = newdataadr(fd, cu->mat);
|
||||
test_pointer_array(fd, (void **)&cu->mat);
|
||||
cu->str = newdataadr(fd, cu->str);
|
||||
cu->strinfo= newdataadr(fd, cu->strinfo);
|
||||
cu->strinfo= newdataadr(fd, cu->strinfo);
|
||||
cu->tb = newdataadr(fd, cu->tb);
|
||||
|
||||
if (cu->vfont == NULL) link_list(fd, &(cu->nurb));
|
||||
@ -3138,14 +3138,14 @@ static void direct_link_curve(FileData *fd, Curve *cu)
|
||||
if (cu->tb) {
|
||||
memcpy(tb, cu->tb, cu->totbox*sizeof(TextBox));
|
||||
MEM_freeN(cu->tb);
|
||||
cu->tb = tb;
|
||||
cu->tb = tb;
|
||||
}
|
||||
else {
|
||||
cu->totbox = 1;
|
||||
cu->actbox = 1;
|
||||
cu->tb = tb;
|
||||
cu->tb[0].w = cu->linewidth;
|
||||
}
|
||||
}
|
||||
if (cu->wordspace == 0.0f) cu->wordspace = 1.0f;
|
||||
}
|
||||
|
||||
@ -3314,7 +3314,7 @@ static const char *ptcache_data_struct[] = {
|
||||
"", // BPHYS_DATA_ROTATION
|
||||
"", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
|
||||
"", // BPHYS_DATA_SIZE:
|
||||
"", // BPHYS_DATA_TIMES:
|
||||
"", // BPHYS_DATA_TIMES:
|
||||
"BoidData" // case BPHYS_DATA_BOIDS:
|
||||
};
|
||||
static void direct_link_pointcache(FileData *fd, PointCache *cache)
|
||||
@ -3423,7 +3423,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
|
||||
/* special case for only one object in the group */
|
||||
index_ok = 1;
|
||||
}
|
||||
else {
|
||||
else {
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
if (dw->index > 0) {
|
||||
index_ok = 1;
|
||||
@ -3431,7 +3431,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (index_ok) {
|
||||
/* if we have indexes, let's use them */
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
@ -3443,9 +3443,9 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
|
||||
/* otherwise try to get objects from own library (won't work on library linked groups) */
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
dw->ob = newlibadr(fd, part->id.lib, dw->ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
part->dupliweights.first = part->dupliweights.last = NULL;
|
||||
}
|
||||
@ -3660,7 +3660,7 @@ static void lib_link_mtface(FileData *fd, Mesh *me, MTFace *mtface, int totface)
|
||||
|
||||
static void lib_link_customdata_mtface(FileData *fd, Mesh *me, CustomData *fdata, int totface)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
for (i = 0; i < fdata->totlayer; i++) {
|
||||
CustomDataLayer *layer = &fdata->layers[i];
|
||||
|
||||
@ -3685,11 +3685,11 @@ static void lib_link_customdata_mtpoly(FileData *fd, Mesh *me, CustomData *pdata
|
||||
tf->tpage = newlibadr(fd, me->id.lib, tf->tpage);
|
||||
if (tf->tpage && tf->tpage->id.us == 0) {
|
||||
tf->tpage->id.us = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void lib_link_mesh(FileData *fd, Main *main)
|
||||
{
|
||||
@ -4109,7 +4109,7 @@ static void lib_link_object(FileData *fd, Main *main)
|
||||
if (paf->type == EFF_PARTICLE) {
|
||||
paf->group = newlibadr_us(fd, ob->id.lib, paf->group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (sens = ob->sensors.first; sens; sens = sens->next) {
|
||||
for (a = 0; a < sens->totlinks; a++)
|
||||
@ -4641,7 +4641,7 @@ static void direct_link_object(FileData *fd, Object *ob)
|
||||
direct_link_partdeflect(ob->pd);
|
||||
ob->soft= newdataadr(fd, ob->soft);
|
||||
if (ob->soft) {
|
||||
SoftBody *sb = ob->soft;
|
||||
SoftBody *sb = ob->soft;
|
||||
|
||||
sb->bpoint = NULL; // init pointers so it gets rebuilt nicely
|
||||
sb->bspring = NULL;
|
||||
@ -5090,7 +5090,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
||||
ed->seqbasep = (ListBase *)(poin+offset);
|
||||
else
|
||||
ed->seqbasep = &ed->seqbase;
|
||||
}
|
||||
}
|
||||
/* stack */
|
||||
link_list(fd, &(ed->metastack));
|
||||
|
||||
@ -5124,7 +5124,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
||||
}
|
||||
if (sce->r.ffcodecdata.properties) {
|
||||
sce->r.ffcodecdata.properties = newdataadr(fd, sce->r.ffcodecdata.properties);
|
||||
if (sce->r.ffcodecdata.properties) {
|
||||
if (sce->r.ffcodecdata.properties) {
|
||||
IDP_DirectLinkProperty(sce->r.ffcodecdata.properties,
|
||||
(fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
|
||||
}
|
||||
@ -6415,8 +6415,10 @@ static void lib_link_linestyle(FileData *fd, Main *main)
|
||||
if (linestyle->id.flag & LIB_NEED_LINK) {
|
||||
linestyle->id.flag -= LIB_NEED_LINK;
|
||||
|
||||
if (linestyle->id.properties) IDP_LibLinkProperty(linestyle->id.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
|
||||
if (linestyle->adt) lib_link_animdata(fd, &linestyle->id, linestyle->adt);
|
||||
if (linestyle->id.properties)
|
||||
IDP_LibLinkProperty(linestyle->id.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
|
||||
if (linestyle->adt)
|
||||
lib_link_animdata(fd, &linestyle->id, linestyle->adt);
|
||||
for (m = linestyle->color_modifiers.first; m; m = m->next) {
|
||||
switch (m->type) {
|
||||
case LS_MODIFIER_DISTANCE_FROM_OBJECT:
|
||||
@ -6561,16 +6563,16 @@ static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle)
|
||||
linestyle->adt= newdataadr(fd, linestyle->adt);
|
||||
direct_link_animdata(fd, linestyle->adt);
|
||||
link_list(fd, &linestyle->color_modifiers);
|
||||
for(modifier=linestyle->color_modifiers.first; modifier; modifier= modifier->next)
|
||||
for(modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_color_modifier(fd, modifier);
|
||||
link_list(fd, &linestyle->alpha_modifiers);
|
||||
for(modifier=linestyle->alpha_modifiers.first; modifier; modifier= modifier->next)
|
||||
for(modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_alpha_modifier(fd, modifier);
|
||||
link_list(fd, &linestyle->thickness_modifiers);
|
||||
for(modifier=linestyle->thickness_modifiers.first; modifier; modifier= modifier->next)
|
||||
for(modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_thickness_modifier(fd, modifier);
|
||||
link_list(fd, &linestyle->geometry_modifiers);
|
||||
for(modifier=linestyle->geometry_modifiers.first; modifier; modifier= modifier->next)
|
||||
for(modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next)
|
||||
direct_link_linestyle_geometry_modifier(fd, modifier);
|
||||
}
|
||||
|
||||
@ -7340,7 +7342,7 @@ static void do_version_node_fix_internal_links_264(void *UNUSED(data), ID *UNUSE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void do_version_logic_264(ListBase *regionbase)
|
||||
{
|
||||
ARegion *ar;
|
||||
@ -7588,10 +7590,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
if ( (ob->dsize[i] == 0.0f) || /* simple case, user never touched dsize */
|
||||
(ob->size[i] == 0.0f)) /* cant scale the dsize to give a non zero result, so fallback to 1.0f */
|
||||
{
|
||||
ob->dscale[i]= 1.0f;
|
||||
ob->dscale[i] = 1.0f;
|
||||
}
|
||||
else {
|
||||
ob->dscale[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
|
||||
ob->dscale[i] = (ob->size[i] + ob->dsize[i]) / ob->size[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8477,7 +8479,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
do_version_node_fix_internal_links_264(NULL, NULL, ntree);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (main->versionfile < 264 || (main->versionfile == 264 && main->subversionfile < 6)) {
|
||||
bScreen *sc;
|
||||
|
||||
@ -8579,28 +8581,28 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
|
||||
for(sce = main->scene.first; sce; sce = sce->id.next) {
|
||||
if (sce->r.line_thickness_mode == 0) {
|
||||
sce->r.line_thickness_mode= R_LINE_THICKNESS_ABSOLUTE;
|
||||
sce->r.unit_line_thickness= 1.f;
|
||||
sce->r.line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE;
|
||||
sce->r.unit_line_thickness = 1.0f;
|
||||
}
|
||||
for(srl= sce->r.layers.first; srl; srl= srl->next) {
|
||||
for(srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
if (srl->freestyleConfig.mode == 0)
|
||||
srl->freestyleConfig.mode= FREESTYLE_CONTROL_EDITOR_MODE;
|
||||
srl->freestyleConfig.mode = FREESTYLE_CONTROL_EDITOR_MODE;
|
||||
if (srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE ||
|
||||
srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL) {
|
||||
srl->freestyleConfig.raycasting_algorithm= 0; /* deprecated */
|
||||
srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL) {
|
||||
srl->freestyleConfig.raycasting_algorithm = 0; /* deprecated */
|
||||
srl->freestyleConfig.flags |= FREESTYLE_CULLING;
|
||||
}
|
||||
}
|
||||
}
|
||||
for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
|
||||
if (linestyle->thickness_position == 0) {
|
||||
linestyle->thickness_position= LS_THICKNESS_CENTER;
|
||||
linestyle->thickness_ratio= 0.5f;
|
||||
linestyle->thickness_position = LS_THICKNESS_CENTER;
|
||||
linestyle->thickness_ratio = 0.5f;
|
||||
}
|
||||
if (linestyle->chaining == 0)
|
||||
linestyle->chaining= LS_CHAINING_PLAIN;
|
||||
linestyle->chaining = LS_CHAINING_PLAIN;
|
||||
if (linestyle->rounds == 0)
|
||||
linestyle->rounds= 3;
|
||||
linestyle->rounds = 3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9261,7 +9263,7 @@ static void expand_curve(FileData *fd, Main *mainvar, Curve *cu)
|
||||
}
|
||||
|
||||
expand_doit(fd, mainvar, cu->vfont);
|
||||
expand_doit(fd, mainvar, cu->vfontb);
|
||||
expand_doit(fd, mainvar, cu->vfontb);
|
||||
expand_doit(fd, mainvar, cu->vfonti);
|
||||
expand_doit(fd, mainvar, cu->vfontbi);
|
||||
expand_doit(fd, mainvar, cu->key);
|
||||
@ -10113,7 +10115,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
|
||||
if ((*fd)->flags & FD_FLAGS_SWITCH_ENDIAN) {
|
||||
blo_freefiledata(*fd);
|
||||
*fd = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BLO_library_append_end(const bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag)
|
||||
|
@ -2286,14 +2286,14 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
|
||||
for (ts = sce->transform_spaces.first; ts; ts = ts->next)
|
||||
writestruct(wd, DATA, "TransformOrientation", 1, ts);
|
||||
|
||||
for (srl= sce->r.layers.first; srl; srl= srl->next) {
|
||||
for (srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
writestruct(wd, DATA, "SceneRenderLayer", 1, srl);
|
||||
|
||||
for(fmc= srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
|
||||
for(fmc = srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
|
||||
writestruct(wd, DATA, "FreestyleModuleConfig", 1, fmc);
|
||||
}
|
||||
|
||||
for(fls= srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
|
||||
for(fls = srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
|
||||
writestruct(wd, DATA, "FreestyleLineSet", 1, fls);
|
||||
}
|
||||
|
||||
@ -2893,7 +2893,7 @@ static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
|
||||
struct_name = "LineStyleColorModifier_Material";
|
||||
break;
|
||||
default:
|
||||
struct_name = "LineStyleColorModifier"; // this should not happen
|
||||
struct_name = "LineStyleColorModifier"; /* this should not happen */
|
||||
}
|
||||
writestruct(wd, DATA, struct_name, 1, m);
|
||||
}
|
||||
@ -2935,7 +2935,7 @@ static void write_linestyle_alpha_modifiers(WriteData *wd, ListBase *modifiers)
|
||||
struct_name = "LineStyleAlphaModifier_Material";
|
||||
break;
|
||||
default:
|
||||
struct_name = "LineStyleAlphaModifier"; // this should not happen
|
||||
struct_name = "LineStyleAlphaModifier"; /* this should not happen */
|
||||
}
|
||||
writestruct(wd, DATA, struct_name, 1, m);
|
||||
}
|
||||
@ -2980,7 +2980,7 @@ static void write_linestyle_thickness_modifiers(WriteData *wd, ListBase *modifie
|
||||
struct_name = "LineStyleThicknessModifier_Calligraphy";
|
||||
break;
|
||||
default:
|
||||
struct_name = "LineStyleThicknessModifier"; // this should not happen
|
||||
struct_name = "LineStyleThicknessModifier"; /* this should not happen */
|
||||
}
|
||||
writestruct(wd, DATA, struct_name, 1, m);
|
||||
}
|
||||
@ -3049,7 +3049,7 @@ static void write_linestyle_geometry_modifiers(WriteData *wd, ListBase *modifier
|
||||
struct_name = "LineStyleGeometryModifier_2DTransform";
|
||||
break;
|
||||
default:
|
||||
struct_name = "LineStyleGeometryModifier"; // this should not happen
|
||||
struct_name = "LineStyleGeometryModifier"; /* this should not happen */
|
||||
}
|
||||
writestruct(wd, DATA, struct_name, 1, m);
|
||||
}
|
||||
@ -3059,11 +3059,13 @@ static void write_linestyles(WriteData *wd, ListBase *idbase)
|
||||
{
|
||||
FreestyleLineStyle *linestyle;
|
||||
|
||||
for(linestyle=idbase->first; linestyle; linestyle= linestyle->id.next) {
|
||||
if(linestyle->id.us>0 || wd->current) {
|
||||
for (linestyle = idbase->first; linestyle; linestyle = linestyle->id.next) {
|
||||
if (linestyle->id.us>0 || wd->current) {
|
||||
writestruct(wd, ID_LS, "FreestyleLineStyle", 1, linestyle);
|
||||
if (linestyle->id.properties) IDP_WriteProperty(linestyle->id.properties, wd);
|
||||
if (linestyle->adt) write_animdata(wd, linestyle->adt);
|
||||
if (linestyle->id.properties)
|
||||
IDP_WriteProperty(linestyle->id.properties, wd);
|
||||
if (linestyle->adt)
|
||||
write_animdata(wd, linestyle->adt);
|
||||
write_linestyle_color_modifiers(wd, &linestyle->color_modifiers);
|
||||
write_linestyle_alpha_modifiers(wd, &linestyle->alpha_modifiers);
|
||||
write_linestyle_thickness_modifiers(wd, &linestyle->thickness_modifiers);
|
||||
|
@ -980,19 +980,19 @@ char BM_vert_flag_from_mflag(const char meflag)
|
||||
}
|
||||
char BM_edge_flag_from_mflag(const short meflag)
|
||||
{
|
||||
return ( ((meflag & SELECT) ? BM_ELEM_SELECT : 0) |
|
||||
((meflag & ME_SEAM) ? BM_ELEM_SEAM : 0) |
|
||||
((meflag & ME_EDGEDRAW) ? BM_ELEM_DRAW : 0) |
|
||||
((meflag & ME_SHARP) == 0 ? BM_ELEM_SMOOTH : 0) | /* invert */
|
||||
((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0) |
|
||||
return ( ((meflag & SELECT) ? BM_ELEM_SELECT : 0) |
|
||||
((meflag & ME_SEAM) ? BM_ELEM_SEAM : 0) |
|
||||
((meflag & ME_EDGEDRAW) ? BM_ELEM_DRAW : 0) |
|
||||
((meflag & ME_SHARP) == 0 ? BM_ELEM_SMOOTH : 0) | /* invert */
|
||||
((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0) |
|
||||
((meflag & ME_FREESTYLE_EDGE) ? BM_ELEM_FREESTYLE : 0)
|
||||
);
|
||||
}
|
||||
char BM_face_flag_from_mflag(const char meflag)
|
||||
{
|
||||
return ( ((meflag & ME_FACE_SEL) ? BM_ELEM_SELECT : 0) |
|
||||
((meflag & ME_SMOOTH) ? BM_ELEM_SMOOTH : 0) |
|
||||
((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0) |
|
||||
return ( ((meflag & ME_FACE_SEL) ? BM_ELEM_SELECT : 0) |
|
||||
((meflag & ME_SMOOTH) ? BM_ELEM_SMOOTH : 0) |
|
||||
((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0) |
|
||||
((meflag & ME_FREESTYLE_FACE) ? BM_ELEM_FREESTYLE : 0)
|
||||
);
|
||||
}
|
||||
@ -1011,13 +1011,13 @@ short BM_edge_flag_to_mflag(BMEdge *eed)
|
||||
{
|
||||
const char hflag = eed->head.hflag;
|
||||
|
||||
return ( ((hflag & BM_ELEM_SELECT) ? SELECT : 0) |
|
||||
((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) |
|
||||
((hflag & BM_ELEM_DRAW) ? ME_EDGEDRAW : 0) |
|
||||
((hflag & BM_ELEM_SMOOTH) == 0 ? ME_SHARP : 0) |
|
||||
((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
|
||||
return ( ((hflag & BM_ELEM_SELECT) ? SELECT : 0) |
|
||||
((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) |
|
||||
((hflag & BM_ELEM_DRAW) ? ME_EDGEDRAW : 0) |
|
||||
((hflag & BM_ELEM_SMOOTH) == 0 ? ME_SHARP : 0) |
|
||||
((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
|
||||
((hflag & BM_ELEM_FREESTYLE) ? ME_FREESTYLE_EDGE : 0) |
|
||||
((BM_edge_is_wire(eed)) ? ME_LOOSEEDGE : 0) | /* not typical */
|
||||
((BM_edge_is_wire(eed)) ? ME_LOOSEEDGE : 0) | /* not typical */
|
||||
ME_EDGERENDER
|
||||
);
|
||||
}
|
||||
@ -1025,9 +1025,9 @@ char BM_face_flag_to_mflag(BMFace *efa)
|
||||
{
|
||||
const char hflag = efa->head.hflag;
|
||||
|
||||
return ( ((hflag & BM_ELEM_SELECT) ? ME_FACE_SEL : 0) |
|
||||
((hflag & BM_ELEM_SMOOTH) ? ME_SMOOTH : 0) |
|
||||
((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
|
||||
return ( ((hflag & BM_ELEM_SELECT) ? ME_FACE_SEL : 0) |
|
||||
((hflag & BM_ELEM_SMOOTH) ? ME_SMOOTH : 0) |
|
||||
((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
|
||||
((hflag & BM_ELEM_FREESTYLE) ? ME_FREESTYLE_FACE : 0)
|
||||
);
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ void bmo_similar_edges_exec(BMesh *bm, BMOperator *op)
|
||||
case SIMEDGE_FREESTYLE:
|
||||
if (BM_elem_flag_test(e, BM_ELEM_FREESTYLE) == BM_elem_flag_test(es, BM_ELEM_FREESTYLE)) {
|
||||
BMO_elem_flag_enable(bm, e, EDGE_MARK);
|
||||
cont = 0;
|
||||
cont = FALSE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -2013,7 +2013,7 @@ static bAnimChannelType ACF_DSNTREE =
|
||||
|
||||
/* LineStyle Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dslinestyle_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_BRUSH_DATA; /* FIXME */
|
||||
@ -2023,7 +2023,7 @@ static int acf_dslinestyle_icon(bAnimListElem *UNUSED(ale))
|
||||
static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
|
||||
{
|
||||
/* clear extra return data first */
|
||||
*neg= 0;
|
||||
*neg = 0;
|
||||
|
||||
switch (setting) {
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
@ -2033,7 +2033,7 @@ static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), int setting, s
|
||||
return ADT_NLA_EVAL_OFF;
|
||||
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
|
||||
*neg= 1;
|
||||
*neg = 1;
|
||||
return ADT_CURVES_NOT_VISIBLE;
|
||||
|
||||
case ACHANNEL_SETTING_SELECT: /* selected */
|
||||
@ -2047,10 +2047,10 @@ static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), int setting, s
|
||||
/* get pointer to the setting */
|
||||
static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
{
|
||||
FreestyleLineStyle *linestyle= (FreestyleLineStyle *)ale->data;
|
||||
FreestyleLineStyle *linestyle = (FreestyleLineStyle *)ale->data;
|
||||
|
||||
/* clear extra return data first */
|
||||
*type= 0;
|
||||
*type = 0;
|
||||
|
||||
switch (setting) {
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
|
@ -739,15 +739,15 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
|
||||
break;
|
||||
case ANIMTYPE_DSLINESTYLE:
|
||||
{
|
||||
FreestyleLineStyle *linestyle= (FreestyleLineStyle *)data;
|
||||
AnimData *adt= linestyle->adt;
|
||||
FreestyleLineStyle *linestyle = (FreestyleLineStyle *)data;
|
||||
AnimData *adt = linestyle->adt;
|
||||
|
||||
ale->flag= FILTER_LS_SCED(linestyle);
|
||||
ale->flag = FILTER_LS_SCED(linestyle);
|
||||
|
||||
ale->key_data= (adt) ? adt->action : NULL;
|
||||
ale->datatype= ALE_ACT;
|
||||
ale->key_data = (adt) ? adt->action : NULL;
|
||||
ale->datatype = ALE_ACT;
|
||||
|
||||
ale->adt= BKE_animdata_from_id(data);
|
||||
ale->adt = BKE_animdata_from_id(data);
|
||||
}
|
||||
break;
|
||||
case ANIMTYPE_DSPART:
|
||||
@ -1532,7 +1532,7 @@ static size_t animdata_filter_ds_linestyle (bAnimContext *ac, ListBase *anim_dat
|
||||
SceneRenderLayer *srl;
|
||||
size_t items = 0;
|
||||
|
||||
for (srl= sce->r.layers.first; srl; srl= srl->next) {
|
||||
for (srl = sce->r.layers.first; srl; srl = srl->next) {
|
||||
FreestyleLineSet *lineset;
|
||||
|
||||
/* skip render layers without Freestyle enabled */
|
||||
@ -1540,7 +1540,7 @@ static size_t animdata_filter_ds_linestyle (bAnimContext *ac, ListBase *anim_dat
|
||||
continue;
|
||||
|
||||
/* loop over linesets defined in the render layer */
|
||||
for (lineset= srl->freestyleConfig.linesets.first; lineset; lineset= lineset->next) {
|
||||
for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) {
|
||||
FreestyleLineStyle *linestyle = lineset->linestyle;
|
||||
ListBase tmp_data = {NULL, NULL};
|
||||
size_t tmp_items = 0;
|
||||
|
@ -2412,7 +2412,8 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
|
||||
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, ptr, "use_textures", i, 0, 0, 0, 0, NULL);
|
||||
}
|
||||
else if (RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer) || RNA_struct_is_a(itemptr->type, &RNA_FreestyleLineSet)) {
|
||||
else if (RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer) ||
|
||||
RNA_struct_is_a(itemptr->type, &RNA_FreestyleLineSet)) {
|
||||
uiItemL(sub, name, icon);
|
||||
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "use", 0, 0, 0, 0, 0, NULL);
|
||||
|
@ -1976,9 +1976,9 @@ void init_userdef_do_versions(void)
|
||||
{
|
||||
bTheme *btheme;
|
||||
|
||||
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
|
||||
/* check for alpha==0 is safe, then color was never set */
|
||||
if(btheme->tv3d.freestyle_edge_mark[3]==0) {
|
||||
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
||||
/* check for alpha == 0 is safe, then color was never set */
|
||||
if (btheme->tv3d.freestyle_edge_mark[3] == 0) {
|
||||
rgba_char_args_set(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
|
||||
rgba_char_args_set(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
|
||||
}
|
||||
|
@ -1271,11 +1271,11 @@ static int edbm_vert_connect(bContext *C, wmOperator *op)
|
||||
}
|
||||
else {
|
||||
EDBM_selectmode_flush(em); /* so newly created edges get the selection state from the vertex */
|
||||
|
||||
EDBM_update_generic(C, em, TRUE);
|
||||
|
||||
return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
|
||||
}
|
||||
EDBM_update_generic(C, em, TRUE);
|
||||
|
||||
return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
||||
void MESH_OT_vert_connect(wmOperatorType *ot)
|
||||
@ -5772,7 +5772,8 @@ static int edbm_mark_freestyle_edge(bContext *C, wmOperator *op)
|
||||
BMIter iter;
|
||||
int clear = RNA_boolean_get(op->ptr, "clear");
|
||||
|
||||
if (em == NULL) return OPERATOR_FINISHED;
|
||||
if (em == NULL)
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
/* auto-enable seams drawing */
|
||||
if (clear == 0) {
|
||||
@ -5865,4 +5866,3 @@ void MESH_OT_mark_freestyle_face(wmOperatorType *ot)
|
||||
|
||||
RNA_def_boolean(ot->srna, "clear", 0, "Clear", "");
|
||||
}
|
||||
|
||||
|
@ -576,73 +576,74 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
|
||||
|
||||
static int freestyle_module_add_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
|
||||
FRS_add_module(&srl->freestyleConfig);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_module_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Freestyle Module";
|
||||
ot->idname= "SCENE_OT_freestyle_module_add";
|
||||
ot->description="Add a style module into the list of modules";
|
||||
|
||||
ot->name = "Add Freestyle Module";
|
||||
ot->idname = "SCENE_OT_freestyle_module_add";
|
||||
ot->description = "Add a style module into the list of modules";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_module_add_exec;
|
||||
ot->exec = freestyle_module_add_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
PointerRNA ptr= CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
|
||||
FreestyleModuleConfig *module= ptr.data;
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
|
||||
FreestyleModuleConfig *module = ptr.data;
|
||||
|
||||
FRS_delete_module(&srl->freestyleConfig, module);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_module_remove(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Remove Freestyle Module";
|
||||
ot->idname= "SCENE_OT_freestyle_module_remove";
|
||||
ot->description="Remove the style module from the stack";
|
||||
|
||||
ot->name = "Remove Freestyle Module";
|
||||
ot->idname = "SCENE_OT_freestyle_module_remove";
|
||||
ot->description = "Remove the style module from the stack";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_module_remove_exec;
|
||||
ot->exec = freestyle_module_remove_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_module_move_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
PointerRNA ptr= CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
|
||||
FreestyleModuleConfig *module= ptr.data;
|
||||
int dir= RNA_enum_get(op->ptr, "direction");
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
|
||||
FreestyleModuleConfig *module = ptr.data;
|
||||
int dir = RNA_enum_get(op->ptr, "direction");
|
||||
|
||||
if (dir == 1) {
|
||||
FRS_move_module_up(&srl->freestyleConfig, module);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
FRS_move_module_down(&srl->freestyleConfig, module);
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@ -655,15 +656,15 @@ void SCENE_OT_freestyle_module_move(wmOperatorType *ot)
|
||||
};
|
||||
|
||||
/* identifiers */
|
||||
ot->name= "Move Freestyle Module";
|
||||
ot->idname= "SCENE_OT_freestyle_module_move";
|
||||
ot->description="Change the position of the style module within in the list of style modules";
|
||||
|
||||
ot->name = "Move Freestyle Module";
|
||||
ot->idname = "SCENE_OT_freestyle_module_move";
|
||||
ot->description = "Change the position of the style module within in the list of style modules";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_module_move_exec;
|
||||
ot->exec = freestyle_module_move_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* props */
|
||||
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
|
||||
@ -671,132 +672,133 @@ void SCENE_OT_freestyle_module_move(wmOperatorType *ot)
|
||||
|
||||
static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
|
||||
FRS_add_lineset(&srl->freestyleConfig);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_lineset_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Line Set";
|
||||
ot->idname= "SCENE_OT_freestyle_lineset_add";
|
||||
ot->description="Add a line set into the list of line sets";
|
||||
|
||||
ot->name = "Add Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_add";
|
||||
ot->description = "Add a line set into the list of line sets";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_lineset_add_exec;
|
||||
ot->exec = freestyle_lineset_add_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_active_lineset_poll(bContext *C)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
|
||||
return FRS_get_active_lineset(&srl->freestyleConfig) != NULL;
|
||||
}
|
||||
|
||||
static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
|
||||
FRS_copy_active_lineset(&srl->freestyleConfig);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Copy Line Set";
|
||||
ot->idname= "SCENE_OT_freestyle_lineset_copy";
|
||||
ot->description="Copy the active line set to a buffer";
|
||||
|
||||
ot->name = "Copy Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_copy";
|
||||
ot->description = "Copy the active line set to a buffer";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_lineset_copy_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_lineset_copy_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
|
||||
FRS_paste_active_lineset(&srl->freestyleConfig);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_lineset_paste(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Paste Line Set";
|
||||
ot->idname= "SCENE_OT_freestyle_lineset_paste";
|
||||
ot->description="Paste the buffer content to the active line set";
|
||||
|
||||
ot->name = "Paste Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_paste";
|
||||
ot->description = "Paste the buffer content to the active line set";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_lineset_paste_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_lineset_paste_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
|
||||
FRS_delete_active_lineset(&srl->freestyleConfig);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_lineset_remove(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Remove Line Set";
|
||||
ot->idname= "SCENE_OT_freestyle_lineset_remove";
|
||||
ot->description="Remove the active line set from the list of line sets";
|
||||
|
||||
ot->name = "Remove Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_remove";
|
||||
ot->description = "Remove the active line set from the list of line sets";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_lineset_remove_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_lineset_remove_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_lineset_move_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
int dir= RNA_enum_get(op->ptr, "direction");
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
int dir = RNA_enum_get(op->ptr, "direction");
|
||||
|
||||
if (dir == 1) {
|
||||
FRS_move_active_lineset_up(&srl->freestyleConfig);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
FRS_move_active_lineset_down(&srl->freestyleConfig);
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@ -809,16 +811,16 @@ void SCENE_OT_freestyle_lineset_move(wmOperatorType *ot)
|
||||
};
|
||||
|
||||
/* identifiers */
|
||||
ot->name= "Move Line Set";
|
||||
ot->idname= "SCENE_OT_freestyle_lineset_move";
|
||||
ot->description="Change the position of the active line set within the list of line sets";
|
||||
|
||||
ot->name = "Move Line Set";
|
||||
ot->idname = "SCENE_OT_freestyle_lineset_move";
|
||||
ot->description = "Change the position of the active line set within the list of line sets";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_lineset_move_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_lineset_move_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* props */
|
||||
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
|
||||
@ -826,191 +828,191 @@ void SCENE_OT_freestyle_lineset_move(wmOperatorType *ot)
|
||||
|
||||
static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset to add a new line style to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset to add a new line style to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
lineset->linestyle->id.us--;
|
||||
lineset->linestyle = FRS_copy_linestyle(lineset->linestyle);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_linestyle_new(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "New Line Style";
|
||||
ot->idname= "SCENE_OT_freestyle_linestyle_new";
|
||||
ot->description="Create a new line style, reusable by multiple line sets";
|
||||
|
||||
ot->name = "New Line Style";
|
||||
ot->idname = "SCENE_OT_freestyle_linestyle_new";
|
||||
ot->description = "Create a new line style, reusable by multiple line sets";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_linestyle_new_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_linestyle_new_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
int type= RNA_enum_get(op->ptr, "type");
|
||||
int type = RNA_enum_get(op->ptr, "type");
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
if (FRS_add_linestyle_color_modifier(lineset->linestyle, type) < 0) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type.");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_color_modifier_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Line Color Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_color_modifier_add";
|
||||
ot->name = "Add Line Color Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_color_modifier_add";
|
||||
ot->description = "Add a line color modifier to the line style associated with the active lineset";
|
||||
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
ot->exec= freestyle_color_modifier_add_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
|
||||
ot->invoke = WM_menu_invoke;
|
||||
ot->exec = freestyle_color_modifier_add_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
ot->prop= RNA_def_enum(ot->srna, "type", linestyle_color_modifier_type_items, 0, "Type", "");
|
||||
ot->prop = RNA_def_enum(ot->srna, "type", linestyle_color_modifier_type_items, 0, "Type", "");
|
||||
}
|
||||
|
||||
static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
int type= RNA_enum_get(op->ptr, "type");
|
||||
int type = RNA_enum_get(op->ptr, "type");
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
if (FRS_add_linestyle_alpha_modifier(lineset->linestyle, type) < 0) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type.");
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_alpha_modifier_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Alpha Transparency Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_alpha_modifier_add";
|
||||
ot->name = "Add Alpha Transparency Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_alpha_modifier_add";
|
||||
ot->description = "Add an alpha transparency modifier to the line style associated with the active lineset";
|
||||
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
ot->exec= freestyle_alpha_modifier_add_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
|
||||
ot->invoke = WM_menu_invoke;
|
||||
ot->exec = freestyle_alpha_modifier_add_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
ot->prop= RNA_def_enum(ot->srna, "type", linestyle_alpha_modifier_type_items, 0, "Type", "");
|
||||
ot->prop = RNA_def_enum(ot->srna, "type", linestyle_alpha_modifier_type_items, 0, "Type", "");
|
||||
}
|
||||
|
||||
static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
int type= RNA_enum_get(op->ptr, "type");
|
||||
int type = RNA_enum_get(op->ptr, "type");
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
if (FRS_add_linestyle_thickness_modifier(lineset->linestyle, type) < 0) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type.");
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_thickness_modifier_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Line Thickness Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_thickness_modifier_add";
|
||||
ot->name = "Add Line Thickness Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_thickness_modifier_add";
|
||||
ot->description = "Add a line thickness modifier to the line style associated with the active lineset";
|
||||
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
ot->exec= freestyle_thickness_modifier_add_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
|
||||
ot->invoke = WM_menu_invoke;
|
||||
ot->exec = freestyle_thickness_modifier_add_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
ot->prop= RNA_def_enum(ot->srna, "type", linestyle_thickness_modifier_type_items, 0, "Type", "");
|
||||
ot->prop = RNA_def_enum(ot->srna, "type", linestyle_thickness_modifier_type_items, 0, "Type", "");
|
||||
}
|
||||
|
||||
static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
int type= RNA_enum_get(op->ptr, "type");
|
||||
int type = RNA_enum_get(op->ptr, "type");
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style to add the modifier to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
if (FRS_add_linestyle_geometry_modifier(lineset->linestyle, type) < 0) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type.");
|
||||
BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_geometry_modifier_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Stroke Geometry Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_geometry_modifier_add";
|
||||
ot->name = "Add Stroke Geometry Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_geometry_modifier_add";
|
||||
ot->description = "Add a stroke geometry modifier to the line style associated with the active lineset";
|
||||
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
ot->exec= freestyle_geometry_modifier_add_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
|
||||
ot->invoke = WM_menu_invoke;
|
||||
ot->exec = freestyle_geometry_modifier_add_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
ot->prop= RNA_def_enum(ot->srna, "type", linestyle_geometry_modifier_type_items, 0, "Type", "");
|
||||
ot->prop = RNA_def_enum(ot->srna, "type", linestyle_geometry_modifier_type_items, 0, "Type", "");
|
||||
}
|
||||
|
||||
static int freestyle_get_modifier_type(PointerRNA *ptr)
|
||||
@ -1028,16 +1030,17 @@ static int freestyle_get_modifier_type(PointerRNA *ptr)
|
||||
|
||||
static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
|
||||
LineStyleModifier *modifier= ptr.data;
|
||||
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
|
||||
LineStyleModifier *modifier = ptr.data;
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
switch (freestyle_get_modifier_type(&ptr)) {
|
||||
case LS_MODIFIER_TYPE_COLOR:
|
||||
FRS_remove_linestyle_color_modifier(lineset->linestyle, modifier);
|
||||
@ -1052,93 +1055,93 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op)
|
||||
FRS_remove_linestyle_geometry_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
default:
|
||||
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier.");
|
||||
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_modifier_remove(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Remove Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_modifier_remove";
|
||||
ot->description="Remove the modifier from the list of modifiers";
|
||||
|
||||
ot->name = "Remove Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_modifier_remove";
|
||||
ot->description = "Remove the modifier from the list of modifiers";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_modifier_remove_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_modifier_remove_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
|
||||
LineStyleModifier *modifier= ptr.data;
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
|
||||
LineStyleModifier *modifier = ptr.data;
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to.");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
switch (freestyle_get_modifier_type(&ptr)) {
|
||||
case LS_MODIFIER_TYPE_COLOR:
|
||||
FRS_copy_linestyle_color_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
case LS_MODIFIER_TYPE_ALPHA:
|
||||
FRS_copy_linestyle_alpha_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
case LS_MODIFIER_TYPE_THICKNESS:
|
||||
FRS_copy_linestyle_thickness_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
case LS_MODIFIER_TYPE_GEOMETRY:
|
||||
FRS_copy_linestyle_geometry_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
default:
|
||||
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier.");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
switch (freestyle_get_modifier_type(&ptr)) {
|
||||
case LS_MODIFIER_TYPE_COLOR:
|
||||
FRS_copy_linestyle_color_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
case LS_MODIFIER_TYPE_ALPHA:
|
||||
FRS_copy_linestyle_alpha_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
case LS_MODIFIER_TYPE_THICKNESS:
|
||||
FRS_copy_linestyle_thickness_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
case LS_MODIFIER_TYPE_GEOMETRY:
|
||||
FRS_copy_linestyle_geometry_modifier(lineset->linestyle, modifier);
|
||||
break;
|
||||
default:
|
||||
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_freestyle_modifier_copy(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Copy Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_modifier_copy";
|
||||
ot->description="Duplicate the modifier within the list of modifiers";
|
||||
/* identifiers */
|
||||
ot->name = "Copy Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_modifier_copy";
|
||||
ot->description = "Duplicate the modifier within the list of modifiers";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_modifier_copy_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
/* api callbacks */
|
||||
ot->exec = freestyle_modifier_copy_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(&srl->freestyleConfig);
|
||||
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
|
||||
LineStyleModifier *modifier= ptr.data;
|
||||
int dir= RNA_enum_get(op->ptr, "direction");
|
||||
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier);
|
||||
LineStyleModifier *modifier = ptr.data;
|
||||
int dir = RNA_enum_get(op->ptr, "direction");
|
||||
|
||||
if (!lineset) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to.");
|
||||
BKE_report(op->reports, RPT_ERROR, "No active lineset and associated line style the modifier belongs to");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
switch (freestyle_get_modifier_type(&ptr)) {
|
||||
case LS_MODIFIER_TYPE_COLOR:
|
||||
FRS_move_linestyle_color_modifier(lineset->linestyle, modifier, dir);
|
||||
@ -1153,11 +1156,11 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
|
||||
FRS_move_linestyle_geometry_modifier(lineset->linestyle, modifier, dir);
|
||||
break;
|
||||
default:
|
||||
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier.");
|
||||
BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@ -1170,16 +1173,16 @@ void SCENE_OT_freestyle_modifier_move(wmOperatorType *ot)
|
||||
};
|
||||
|
||||
/* identifiers */
|
||||
ot->name= "Move Modifier";
|
||||
ot->idname= "SCENE_OT_freestyle_modifier_move";
|
||||
ot->description="Move the modifier within the list of modifiers";
|
||||
|
||||
ot->name = "Move Modifier";
|
||||
ot->idname = "SCENE_OT_freestyle_modifier_move";
|
||||
ot->description = "Move the modifier within the list of modifiers";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= freestyle_modifier_move_exec;
|
||||
ot->poll= freestyle_active_lineset_poll;
|
||||
ot->exec = freestyle_modifier_move_exec;
|
||||
ot->poll = freestyle_active_lineset_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* props */
|
||||
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
|
||||
|
@ -380,7 +380,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
|
||||
break;
|
||||
case NC_LINESTYLE:
|
||||
ED_area_tag_redraw(sa);
|
||||
sbuts->preview= 1;
|
||||
sbuts->preview = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ void filelist_from_main(struct FileList *filelist)
|
||||
filelist->filelist[21].relname = BLI_strdup("Action");
|
||||
filelist->filelist[22].relname = BLI_strdup("NodeTree");
|
||||
filelist->filelist[23].relname = BLI_strdup("Speaker");
|
||||
filelist->filelist[24].relname= BLI_strdup("FreestyleLineStyle");
|
||||
filelist->filelist[24].relname = BLI_strdup("FreestyleLineStyle");
|
||||
filelist_sort(filelist, FILE_SORT_ALPHA);
|
||||
}
|
||||
else {
|
||||
|
@ -836,6 +836,9 @@ int transformEvent(TransInfo *t, wmEvent *event)
|
||||
t->redraw |= handleMouseInput(t, &t->mouse, event);
|
||||
|
||||
if (event->type == MOUSEMOVE) {
|
||||
if (t->modifiers & MOD_CONSTRAINT_SELECT)
|
||||
t->con.mode |= CON_SELECT;
|
||||
|
||||
copy_v2_v2_int(t->mval, event->mval);
|
||||
|
||||
// t->redraw |= TREDRAW_SOFT; /* Use this for soft redraw. Might cause flicker in object mode */
|
||||
@ -2037,9 +2040,6 @@ void transformApply(bContext *C, TransInfo *t)
|
||||
t->context = C;
|
||||
|
||||
if ((t->redraw & TREDRAW_HARD) || (t->draw_handle_apply == NULL && (t->redraw & TREDRAW_SOFT))) {
|
||||
if (t->modifiers & MOD_CONSTRAINT_SELECT)
|
||||
t->con.mode |= CON_SELECT;
|
||||
|
||||
selectConstraint(t);
|
||||
if (t->transform) {
|
||||
t->transform(t, t->mval); // calls recalcData()
|
||||
|
@ -1,13 +1,10 @@
|
||||
/* DNA_freestyle_types.h
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -28,52 +25,52 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef DNA_FREESTYLE_TYPES_H
|
||||
#define DNA_FREESTYLE_TYPES_H
|
||||
#ifndef __DNA_FREESTYLE_TYPES_H__
|
||||
#define __DNA_FREESTYLE_TYPES_H__
|
||||
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
struct FreestyleLineStyle;
|
||||
|
||||
/* FreestyleConfig::flags */
|
||||
#define FREESTYLE_SUGGESTIVE_CONTOURS_FLAG 1
|
||||
#define FREESTYLE_RIDGES_AND_VALLEYS_FLAG 2
|
||||
#define FREESTYLE_MATERIAL_BOUNDARIES_FLAG 4
|
||||
#define FREESTYLE_FACE_SMOOTHNESS_FLAG 8
|
||||
#define FREESTYLE_ADVANCED_OPTIONS_FLAG 16
|
||||
#define FREESTYLE_CULLING 32
|
||||
#define FREESTYLE_SUGGESTIVE_CONTOURS_FLAG (1 << 0)
|
||||
#define FREESTYLE_RIDGES_AND_VALLEYS_FLAG (1 << 1)
|
||||
#define FREESTYLE_MATERIAL_BOUNDARIES_FLAG (1 << 2)
|
||||
#define FREESTYLE_FACE_SMOOTHNESS_FLAG (1 << 3)
|
||||
#define FREESTYLE_ADVANCED_OPTIONS_FLAG (1 << 4)
|
||||
#define FREESTYLE_CULLING (1 << 5)
|
||||
|
||||
/* FreestyleConfig::mode */
|
||||
#define FREESTYLE_CONTROL_SCRIPT_MODE 1
|
||||
#define FREESTYLE_CONTROL_EDITOR_MODE 2
|
||||
|
||||
/* FreestyleLineSet::flags */
|
||||
#define FREESTYLE_LINESET_CURRENT 1l
|
||||
#define FREESTYLE_LINESET_ENABLED 2
|
||||
#define FREESTYLE_LINESET_FE_NOT 4
|
||||
#define FREESTYLE_LINESET_FE_AND 8
|
||||
#define FREESTYLE_LINESET_GR_NOT 16
|
||||
#define FREESTYLE_LINESET_FM_NOT 32
|
||||
#define FREESTYLE_LINESET_FM_BOTH 64
|
||||
#define FREESTYLE_LINESET_CURRENT (1 << 0)
|
||||
#define FREESTYLE_LINESET_ENABLED (1 << 1)
|
||||
#define FREESTYLE_LINESET_FE_NOT (1 << 2)
|
||||
#define FREESTYLE_LINESET_FE_AND (1 << 3)
|
||||
#define FREESTYLE_LINESET_GR_NOT (1 << 4)
|
||||
#define FREESTYLE_LINESET_FM_NOT (1 << 5)
|
||||
#define FREESTYLE_LINESET_FM_BOTH (1 << 6)
|
||||
|
||||
/* FreestyleLineSet::selection */
|
||||
#define FREESTYLE_SEL_VISIBILITY 1
|
||||
#define FREESTYLE_SEL_EDGE_TYPES 2
|
||||
#define FREESTYLE_SEL_GROUP 4
|
||||
#define FREESTYLE_SEL_IMAGE_BORDER 8
|
||||
#define FREESTYLE_SEL_FACE_MARK 16
|
||||
#define FREESTYLE_SEL_VISIBILITY (1 << 0)
|
||||
#define FREESTYLE_SEL_EDGE_TYPES (1 << 1)
|
||||
#define FREESTYLE_SEL_GROUP (1 << 2)
|
||||
#define FREESTYLE_SEL_IMAGE_BORDER (1 << 3)
|
||||
#define FREESTYLE_SEL_FACE_MARK (1 << 4)
|
||||
|
||||
/* FreestyleLineSet::edge_types, exclude_edge_types */
|
||||
#define FREESTYLE_FE_SILHOUETTE 1
|
||||
#define FREESTYLE_FE_BORDER 2
|
||||
#define FREESTYLE_FE_CREASE 4
|
||||
#define FREESTYLE_FE_RIDGE_VALLEY 8
|
||||
/* Note: FREESTYLE_FE_VALLEY = 16 is no longer used */
|
||||
#define FREESTYLE_FE_SUGGESTIVE_CONTOUR 32
|
||||
#define FREESTYLE_FE_MATERIAL_BOUNDARY 64
|
||||
#define FREESTYLE_FE_CONTOUR 128
|
||||
#define FREESTYLE_FE_EXTERNAL_CONTOUR 512
|
||||
#define FREESTYLE_FE_EDGE_MARK 1024
|
||||
#define FREESTYLE_FE_SILHOUETTE (1 << 0)
|
||||
#define FREESTYLE_FE_BORDER (1 << 1)
|
||||
#define FREESTYLE_FE_CREASE (1 << 2)
|
||||
#define FREESTYLE_FE_RIDGE_VALLEY (1 << 3)
|
||||
/* Note: FREESTYLE_FE_VALLEY = (1 << 4) is no longer used */
|
||||
#define FREESTYLE_FE_SUGGESTIVE_CONTOUR (1 << 5)
|
||||
#define FREESTYLE_FE_MATERIAL_BOUNDARY (1 << 6)
|
||||
#define FREESTYLE_FE_CONTOUR (1 << 7)
|
||||
#define FREESTYLE_FE_EXTERNAL_CONTOUR (1 << 8)
|
||||
#define FREESTYLE_FE_EDGE_MARK (1 << 9)
|
||||
|
||||
/* FreestyleLineSet::qi */
|
||||
#define FREESTYLE_QI_VISIBLE 1
|
||||
@ -81,14 +78,14 @@ struct FreestyleLineStyle;
|
||||
#define FREESTYLE_QI_RANGE 3
|
||||
|
||||
/* FreestyleConfig::raycasting_algorithm */
|
||||
// Defines should be replaced with ViewMapBuilder::visibility_algo
|
||||
#define FREESTYLE_ALGO_REGULAR 1
|
||||
#define FREESTYLE_ALGO_FAST 2
|
||||
#define FREESTYLE_ALGO_VERYFAST 3
|
||||
#define FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL 4
|
||||
#define FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL 5
|
||||
#define FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE 6
|
||||
#define FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE 7
|
||||
/* Defines should be replaced with ViewMapBuilder::visibility_algo */
|
||||
#define FREESTYLE_ALGO_REGULAR 1
|
||||
#define FREESTYLE_ALGO_FAST 2
|
||||
#define FREESTYLE_ALGO_VERYFAST 3
|
||||
#define FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL 4
|
||||
#define FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL 5
|
||||
#define FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE 6
|
||||
#define FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE 7
|
||||
|
||||
typedef struct FreestyleLineSet {
|
||||
struct FreestyleLineSet *next, *prev;
|
||||
@ -105,21 +102,19 @@ typedef struct FreestyleLineSet {
|
||||
struct Group *group; /* group of target objects */
|
||||
|
||||
struct FreestyleLineStyle *linestyle;
|
||||
|
||||
} FreestyleLineSet;
|
||||
|
||||
typedef struct FreestyleModuleConfig {
|
||||
struct FreestyleModuleConfig *next, *prev;
|
||||
|
||||
|
||||
char module_path[256];
|
||||
short is_displayed;
|
||||
short pad[3];
|
||||
|
||||
} FreestyleModuleConfig;
|
||||
|
||||
typedef struct FreestyleConfig {
|
||||
ListBase modules;
|
||||
|
||||
|
||||
int mode; /* scripting, editor */
|
||||
int raycasting_algorithm; /* XXX deprecated */
|
||||
int flags; /* suggestive contours, ridges/valleys, material boundaries */
|
||||
@ -128,7 +123,6 @@ typedef struct FreestyleConfig {
|
||||
float crease_angle; /* in radians! */
|
||||
|
||||
ListBase linesets;
|
||||
|
||||
} FreestyleConfig;
|
||||
|
||||
#endif
|
||||
|
@ -1,13 +1,10 @@
|
||||
/* DNA_linestyle_types.h
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
/*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -28,8 +25,8 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#ifndef DNA_LINESTYLE_TYPES_H
|
||||
#define DNA_LINESTYLE_TYPES_H
|
||||
#ifndef __DNA_LINESTYLE_TYPES_H__
|
||||
#define __DNA_LINESTYLE_TYPES_H__
|
||||
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_ID.h"
|
||||
@ -96,7 +93,6 @@ typedef struct LineStyleColorModifier_AlongStroke {
|
||||
struct LineStyleModifier modifier;
|
||||
|
||||
struct ColorBand *color_ramp;
|
||||
|
||||
} LineStyleColorModifier_AlongStroke;
|
||||
|
||||
typedef struct LineStyleAlphaModifier_AlongStroke {
|
||||
@ -105,7 +101,6 @@ typedef struct LineStyleAlphaModifier_AlongStroke {
|
||||
struct CurveMapping *curve;
|
||||
int flags;
|
||||
int pad;
|
||||
|
||||
} LineStyleAlphaModifier_AlongStroke;
|
||||
|
||||
typedef struct LineStyleThicknessModifier_AlongStroke {
|
||||
@ -115,7 +110,6 @@ typedef struct LineStyleThicknessModifier_AlongStroke {
|
||||
int flags;
|
||||
float value_min, value_max;
|
||||
int pad;
|
||||
|
||||
} LineStyleThicknessModifier_AlongStroke;
|
||||
|
||||
/* Distance from Camera modifiers */
|
||||
@ -125,7 +119,6 @@ typedef struct LineStyleColorModifier_DistanceFromCamera {
|
||||
|
||||
struct ColorBand *color_ramp;
|
||||
float range_min, range_max;
|
||||
|
||||
} LineStyleColorModifier_DistanceFromCamera;
|
||||
|
||||
typedef struct LineStyleAlphaModifier_DistanceFromCamera {
|
||||
@ -135,7 +128,6 @@ typedef struct LineStyleAlphaModifier_DistanceFromCamera {
|
||||
int flags;
|
||||
float range_min, range_max;
|
||||
int pad;
|
||||
|
||||
} LineStyleAlphaModifier_DistanceFromCamera;
|
||||
|
||||
typedef struct LineStyleThicknessModifier_DistanceFromCamera {
|
||||
@ -146,7 +138,6 @@ typedef struct LineStyleThicknessModifier_DistanceFromCamera {
|
||||
float range_min, range_max;
|
||||
float value_min, value_max;
|
||||
int pad;
|
||||
|
||||
} LineStyleThicknessModifier_DistanceFromCamera;
|
||||
|
||||
/* Distance from Object modifiers */
|
||||
@ -157,7 +148,6 @@ typedef struct LineStyleColorModifier_DistanceFromObject {
|
||||
struct Object *target;
|
||||
struct ColorBand *color_ramp;
|
||||
float range_min, range_max;
|
||||
|
||||
} LineStyleColorModifier_DistanceFromObject;
|
||||
|
||||
typedef struct LineStyleAlphaModifier_DistanceFromObject {
|
||||
@ -168,7 +158,6 @@ typedef struct LineStyleAlphaModifier_DistanceFromObject {
|
||||
int flags;
|
||||
float range_min, range_max;
|
||||
int pad;
|
||||
|
||||
} LineStyleAlphaModifier_DistanceFromObject;
|
||||
|
||||
typedef struct LineStyleThicknessModifier_DistanceFromObject {
|
||||
@ -180,21 +169,20 @@ typedef struct LineStyleThicknessModifier_DistanceFromObject {
|
||||
float range_min, range_max;
|
||||
float value_min, value_max;
|
||||
int pad;
|
||||
|
||||
} LineStyleThicknessModifier_DistanceFromObject;
|
||||
|
||||
/* Material modifiers */
|
||||
|
||||
/* mat_attr */
|
||||
#define LS_MODIFIER_MATERIAL_DIFF 1
|
||||
#define LS_MODIFIER_MATERIAL_DIFF_R 2
|
||||
#define LS_MODIFIER_MATERIAL_DIFF_G 3
|
||||
#define LS_MODIFIER_MATERIAL_DIFF_B 4
|
||||
#define LS_MODIFIER_MATERIAL_SPEC 5
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_R 6
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_G 7
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_B 8
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_HARD 9
|
||||
#define LS_MODIFIER_MATERIAL_DIFF 1
|
||||
#define LS_MODIFIER_MATERIAL_DIFF_R 2
|
||||
#define LS_MODIFIER_MATERIAL_DIFF_G 3
|
||||
#define LS_MODIFIER_MATERIAL_DIFF_B 4
|
||||
#define LS_MODIFIER_MATERIAL_SPEC 5
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_R 6
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_G 7
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_B 8
|
||||
#define LS_MODIFIER_MATERIAL_SPEC_HARD 9
|
||||
#define LS_MODIFIER_MATERIAL_ALPHA 10
|
||||
|
||||
typedef struct LineStyleColorModifier_Material {
|
||||
@ -203,7 +191,6 @@ typedef struct LineStyleColorModifier_Material {
|
||||
struct ColorBand *color_ramp;
|
||||
int flags;
|
||||
int mat_attr;
|
||||
|
||||
} LineStyleColorModifier_Material;
|
||||
|
||||
typedef struct LineStyleAlphaModifier_Material {
|
||||
@ -212,7 +199,6 @@ typedef struct LineStyleAlphaModifier_Material {
|
||||
struct CurveMapping *curve;
|
||||
int flags;
|
||||
int mat_attr;
|
||||
|
||||
} LineStyleAlphaModifier_Material;
|
||||
|
||||
typedef struct LineStyleThicknessModifier_Material {
|
||||
@ -222,7 +208,6 @@ typedef struct LineStyleThicknessModifier_Material {
|
||||
int flags;
|
||||
float value_min, value_max;
|
||||
int mat_attr;
|
||||
|
||||
} LineStyleThicknessModifier_Material;
|
||||
|
||||
/* Geometry modifiers */
|
||||
@ -232,7 +217,6 @@ typedef struct LineStyleGeometryModifier_Sampling {
|
||||
|
||||
float sampling;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_Sampling;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_BezierCurve {
|
||||
@ -240,7 +224,6 @@ typedef struct LineStyleGeometryModifier_BezierCurve {
|
||||
|
||||
float error;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_BezierCurve;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_SinusDisplacement {
|
||||
@ -248,7 +231,6 @@ typedef struct LineStyleGeometryModifier_SinusDisplacement {
|
||||
|
||||
float wavelength, amplitude, phase;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_SinusDisplacement;
|
||||
|
||||
/* LineStyleGeometryModifier_SpatialNoise::flags */
|
||||
@ -261,7 +243,6 @@ typedef struct LineStyleGeometryModifier_SpatialNoise {
|
||||
float amplitude, scale;
|
||||
unsigned int octaves;
|
||||
int flags;
|
||||
|
||||
} LineStyleGeometryModifier_SpatialNoise;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_PerlinNoise1D {
|
||||
@ -272,7 +253,6 @@ typedef struct LineStyleGeometryModifier_PerlinNoise1D {
|
||||
unsigned int octaves;
|
||||
int seed;
|
||||
int pad1;
|
||||
|
||||
} LineStyleGeometryModifier_PerlinNoise1D;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_PerlinNoise2D {
|
||||
@ -283,7 +263,6 @@ typedef struct LineStyleGeometryModifier_PerlinNoise2D {
|
||||
unsigned int octaves;
|
||||
int seed;
|
||||
int pad1;
|
||||
|
||||
} LineStyleGeometryModifier_PerlinNoise2D;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_BackboneStretcher {
|
||||
@ -291,7 +270,6 @@ typedef struct LineStyleGeometryModifier_BackboneStretcher {
|
||||
|
||||
float backbone_length;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_BackboneStretcher;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_TipRemover {
|
||||
@ -299,7 +277,6 @@ typedef struct LineStyleGeometryModifier_TipRemover {
|
||||
|
||||
float tip_length;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_TipRemover;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_Polygonalization {
|
||||
@ -307,7 +284,6 @@ typedef struct LineStyleGeometryModifier_Polygonalization {
|
||||
|
||||
float error;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_Polygonalization;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_GuidingLines {
|
||||
@ -315,7 +291,6 @@ typedef struct LineStyleGeometryModifier_GuidingLines {
|
||||
|
||||
float offset;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_GuidingLines;
|
||||
|
||||
/* LineStyleGeometryModifier_BluePrintLines::shape */
|
||||
@ -332,7 +307,6 @@ typedef struct LineStyleGeometryModifier_Blueprint {
|
||||
unsigned int random_radius;
|
||||
unsigned int random_center;
|
||||
unsigned int random_backbone;
|
||||
|
||||
} LineStyleGeometryModifier_Blueprint;
|
||||
|
||||
typedef struct LineStyleGeometryModifier_2DOffset {
|
||||
@ -340,7 +314,6 @@ typedef struct LineStyleGeometryModifier_2DOffset {
|
||||
|
||||
float start, end;
|
||||
float x, y;
|
||||
|
||||
} LineStyleGeometryModifier_2DOffset;
|
||||
|
||||
/* LineStyleGeometryModifier_2DTransform::pivot */
|
||||
@ -359,7 +332,6 @@ typedef struct LineStyleGeometryModifier_2DTransform {
|
||||
float pivot_u;
|
||||
float pivot_x, pivot_y;
|
||||
int pad;
|
||||
|
||||
} LineStyleGeometryModifier_2DTransform;
|
||||
|
||||
/* Calligraphic thickness modifier */
|
||||
@ -370,7 +342,6 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
|
||||
float min_thickness, max_thickness;
|
||||
float orientation; /* in radians! */
|
||||
int pad;
|
||||
|
||||
} LineStyleThicknessModifier_Calligraphy;
|
||||
|
||||
/* FreestyleLineStyle::panel */
|
||||
@ -382,17 +353,17 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
|
||||
#define LS_PANEL_MISC 6
|
||||
|
||||
/* FreestyleLineStyle::flag */
|
||||
#define LS_DS_EXPAND 1 /* for animation editors */
|
||||
#define LS_SAME_OBJECT 2
|
||||
#define LS_DASHED_LINE 4
|
||||
#define LS_MATERIAL_BOUNDARY 8
|
||||
#define LS_MIN_2D_LENGTH 16
|
||||
#define LS_MAX_2D_LENGTH 32
|
||||
#define LS_NO_CHAINING 64
|
||||
#define LS_MIN_2D_ANGLE 128
|
||||
#define LS_MAX_2D_ANGLE 256
|
||||
#define LS_SPLIT_LENGTH 512
|
||||
#define LS_SPLIT_PATTERN 1024
|
||||
#define LS_DS_EXPAND (1 << 0) /* for animation editors */
|
||||
#define LS_SAME_OBJECT (1 << 1)
|
||||
#define LS_DASHED_LINE (1 << 2)
|
||||
#define LS_MATERIAL_BOUNDARY (1 << 3)
|
||||
#define LS_MIN_2D_LENGTH (1 << 4)
|
||||
#define LS_MAX_2D_LENGTH (1 << 5)
|
||||
#define LS_NO_CHAINING (1 << 6)
|
||||
#define LS_MIN_2D_ANGLE (1 << 7)
|
||||
#define LS_MAX_2D_ANGLE (1 << 8)
|
||||
#define LS_SPLIT_LENGTH (1 << 9)
|
||||
#define LS_SPLIT_PATTERN (1 << 10)
|
||||
|
||||
/* FreestyleLineStyle::chaining */
|
||||
#define LS_CHAINING_PLAIN 1
|
||||
@ -434,7 +405,6 @@ typedef struct FreestyleLineStyle {
|
||||
ListBase alpha_modifiers;
|
||||
ListBase thickness_modifiers;
|
||||
ListBase geometry_modifiers;
|
||||
|
||||
} FreestyleLineStyle;
|
||||
|
||||
#endif
|
||||
|
@ -190,7 +190,6 @@ typedef struct SceneRenderLayer {
|
||||
int pad;
|
||||
|
||||
struct FreestyleConfig freestyleConfig;
|
||||
|
||||
} SceneRenderLayer;
|
||||
|
||||
/* srl->layflag */
|
||||
@ -1459,9 +1458,9 @@ typedef struct Scene {
|
||||
|
||||
/* Paint.flags */
|
||||
typedef enum {
|
||||
PAINT_SHOW_BRUSH = (1<<0),
|
||||
PAINT_FAST_NAVIGATE = (1<<1),
|
||||
PAINT_SHOW_BRUSH_ON_SURFACE = (1<<2),
|
||||
PAINT_SHOW_BRUSH = (1 << 0),
|
||||
PAINT_FAST_NAVIGATE = (1 << 1),
|
||||
PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2),
|
||||
} PaintFlags;
|
||||
|
||||
/* Sculpt.flags */
|
||||
|
@ -399,7 +399,7 @@ static void rna_def_dopesheet(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLINESTYLE);
|
||||
RNA_def_property_ui_text(prop, "Display Line Style", "Include visualization of Line Style related Animation data");
|
||||
RNA_def_property_ui_icon(prop, ICON_BRUSH_DATA, 0); /* FIXME */
|
||||
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
|
||||
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "show_textures", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOTEX);
|
||||
|
@ -195,8 +195,8 @@ static char *rna_ColorRamp_path(PointerRNA *ptr)
|
||||
char *path = FRS_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data);
|
||||
if (path)
|
||||
return path;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -279,8 +279,8 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
|
||||
COLRAMP_GETPATH;
|
||||
}
|
||||
BLI_freelistN(&listbase);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: /* everything else should have a "color_ramp" property */
|
||||
{
|
||||
@ -338,8 +338,8 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
|
||||
FreestyleLineStyle *linestyle= ptr->id.data;
|
||||
|
||||
WM_main_add_notifier(NC_LINESTYLE, linestyle);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -260,7 +260,7 @@ static void rna_Main_masks_begin(CollectionPropertyIterator *iter, PointerRNA *p
|
||||
|
||||
static void rna_Main_linestyle_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
||||
{
|
||||
Main *bmain= (Main*)ptr->data;
|
||||
Main *bmain = (Main*)ptr->data;
|
||||
rna_iterator_listbase_begin(iter, &bmain->linestyle, NULL);
|
||||
}
|
||||
|
||||
|
@ -646,7 +646,7 @@ void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineS
|
||||
if(ID_REAL_USERS(linestyle) <= 0)
|
||||
BKE_libblock_free(&bmain->linestyle, linestyle);
|
||||
else
|
||||
BKE_reportf(reports, RPT_ERROR, "Line style \"%s\" must have zero users to be removed, found %d.", linestyle->id.name+2, ID_REAL_USERS(linestyle));
|
||||
BKE_reportf(reports, RPT_ERROR, "Line style '%s' must have zero users to be removed, found %d", linestyle->id.name+2, ID_REAL_USERS(linestyle));
|
||||
|
||||
/* XXX python now has invalid pointer? */
|
||||
}
|
||||
@ -1711,22 +1711,22 @@ void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
PropertyRNA *parm;
|
||||
|
||||
RNA_def_property_srna(cprop, "BlendDataLineStyles");
|
||||
srna= RNA_def_struct(brna, "BlendDataLineStyles", NULL);
|
||||
srna = RNA_def_struct(brna, "BlendDataLineStyles", NULL);
|
||||
RNA_def_struct_sdna(srna, "Main");
|
||||
RNA_def_struct_ui_text(srna, "Main Line Styles", "Collection of line styles");
|
||||
|
||||
func= RNA_def_function(srna, "new", "rna_Main_linestyles_new");
|
||||
func = RNA_def_function(srna, "new", "rna_Main_linestyles_new");
|
||||
RNA_def_function_ui_description(func, "Add a new line style instance to the main database");
|
||||
parm= RNA_def_string(func, "name", "FreestyleLineStyle", 0, "", "New name for the datablock");
|
||||
parm = RNA_def_string(func, "name", "FreestyleLineStyle", 0, "", "New name for the datablock");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* return type */
|
||||
parm= RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "New line style datablock");
|
||||
parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "New line style datablock");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
func= RNA_def_function(srna, "remove", "rna_Main_linestyles_remove");
|
||||
func = RNA_def_function(srna, "remove", "rna_Main_linestyles_remove");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a line style instance from the current blendfile");
|
||||
parm= RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove");
|
||||
parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
}
|
||||
|
||||
|
@ -1445,14 +1445,14 @@ static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
|
||||
|
||||
static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr)
|
||||
{
|
||||
FreestyleLineSet *lineset= (FreestyleLineSet *)ptr->data;
|
||||
FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
|
||||
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineStyle, lineset->linestyle);
|
||||
}
|
||||
|
||||
static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value)
|
||||
{
|
||||
FreestyleLineSet *lineset= (FreestyleLineSet*)ptr->data;
|
||||
FreestyleLineSet *lineset = (FreestyleLineSet*)ptr->data;
|
||||
|
||||
lineset->linestyle->id.us--;
|
||||
lineset->linestyle = (FreestyleLineStyle *)value.data;
|
||||
@ -1461,12 +1461,13 @@ static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value
|
||||
|
||||
static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
|
||||
{
|
||||
FreestyleConfig *config= (FreestyleConfig *)ptr->data;
|
||||
FreestyleLineSet *lineset= FRS_get_active_lineset(config);
|
||||
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
||||
FreestyleLineSet *lineset = FRS_get_active_lineset(config);
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
|
||||
}
|
||||
|
||||
static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max,
|
||||
int *softmin, int *softmax)
|
||||
{
|
||||
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
||||
|
||||
@ -1476,13 +1477,13 @@ static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, in
|
||||
|
||||
static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)
|
||||
{
|
||||
FreestyleConfig *config= (FreestyleConfig *)ptr->data;
|
||||
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
||||
return FRS_get_active_lineset_index(config);
|
||||
}
|
||||
|
||||
static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value)
|
||||
{
|
||||
FreestyleConfig *config= (FreestyleConfig *)ptr->data;
|
||||
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
||||
FRS_set_active_lineset_index(config, value);
|
||||
}
|
||||
|
||||
@ -1720,7 +1721,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
"Project individual elements on the surface of other objects");
|
||||
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
||||
|
||||
|
||||
prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_NO_SELF);
|
||||
RNA_def_property_ui_text(prop, "Project to Self", "Snap onto itself (editmode)");
|
||||
@ -2102,11 +2103,13 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
|
||||
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
|
||||
prop= RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS);
|
||||
RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in this Layer");
|
||||
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
if (scene)
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
else
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
|
||||
/* passes */
|
||||
prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
|
||||
@ -2334,18 +2337,20 @@ static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
PropertyRNA *prop;
|
||||
|
||||
RNA_def_property_srna(cprop, "Linesets");
|
||||
srna= RNA_def_struct(brna, "Linesets", NULL);
|
||||
srna = RNA_def_struct(brna, "Linesets", NULL);
|
||||
RNA_def_struct_sdna(srna, "FreestyleSettings");
|
||||
RNA_def_struct_ui_text(srna, "Line Sets", "Line sets for associating lines and style parameters");
|
||||
|
||||
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "FreestyleLineSet");
|
||||
RNA_def_property_pointer_funcs(prop, "rna_FreestyleSettings_active_lineset_get", NULL, NULL, NULL);
|
||||
RNA_def_property_ui_text(prop, "Active Line Set", "Active line set being displayed");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_int_funcs(prop, "rna_FreestyleSettings_active_lineset_index_get", "rna_FreestyleSettings_active_lineset_index_set", "rna_FreestyleSettings_active_lineset_index_range");
|
||||
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_int_funcs(prop, "rna_FreestyleSettings_active_lineset_index_get",
|
||||
"rna_FreestyleSettings_active_lineset_index_set",
|
||||
"rna_FreestyleSettings_active_lineset_index_range");
|
||||
RNA_def_property_ui_text(prop, "Active Line Set Index", "Index of active line set slot");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
}
|
||||
@ -2357,250 +2362,282 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
|
||||
|
||||
static EnumPropertyItem edge_type_negation_items[] = {
|
||||
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions"},
|
||||
{FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not satisfying the given edge type conditions"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive",
|
||||
"Select feature edges not satisfying the given edge type conditions"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem edge_type_combination_items[] = {
|
||||
{0, "OR", 0, "Logical OR", "Combine feature edge type conditions by logical OR (logical disjunction)"},
|
||||
{FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND", "Combine feature edge type conditions by logical AND (logical conjunction)"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND",
|
||||
"Combine feature edge type conditions by logical AND (logical conjunction)"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem group_negation_items[] = {
|
||||
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging to some object in the group"},
|
||||
{FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not belonging to any object in the group"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive",
|
||||
"Select feature edges not belonging to any object in the group"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem face_mark_negation_items[] = {
|
||||
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given face mark conditions"},
|
||||
{FREESTYLE_LINESET_FM_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not satisfying the given face mark conditions"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_LINESET_FM_NOT, "EXCLUSIVE", 0, "Exclusive",
|
||||
"Select feature edges not satisfying the given face mark conditions"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem face_mark_condition_items[] = {
|
||||
{0, "ONE", 0, "One Face", "Select feature edges if one of faces on the right and left has a face mark"},
|
||||
{FREESTYLE_LINESET_FM_BOTH, "BOTH", 0, "Both Faces", "Select feature edges if both faces on the right and left faces have a face mark"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_LINESET_FM_BOTH, "BOTH", 0, "Both Faces",
|
||||
"Select feature edges if both faces on the right and left faces have a face mark"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem freestyle_ui_mode_items[] = {
|
||||
{FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode", "Advanced mode for using style modules in Python"},
|
||||
{FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode", "Basic mode for interactive style parameter editing"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode",
|
||||
"Advanced mode for using style modules in Python"},
|
||||
{FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode",
|
||||
"Basic mode for interactive style parameter editing"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem visibility_items[] ={
|
||||
{FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges"},
|
||||
{FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges"},
|
||||
{FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range", "Select feature edges within a range of quantitative invisibility (QI) values"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range",
|
||||
"Select feature edges within a range of quantitative invisibility (QI) values"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
static EnumPropertyItem freestyle_raycasting_algorithm_items[] = {
|
||||
{FREESTYLE_ALGO_REGULAR, "REGULAR", 0, "Normal Ray Casting", "Consider all FEdges in each ViewEdge"},
|
||||
{FREESTYLE_ALGO_FAST, "FAST", 0, "Fast Ray Casting", "Sample some FEdges in each ViewEdge"},
|
||||
{FREESTYLE_ALGO_VERYFAST, "VERYFAST", 0, "Very Fast Ray Casting", "Sample one FEdge in each ViewEdge; do not save list of occluders"},
|
||||
{FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL, "CULLEDADAPTIVETRADITIONAL", 0, "Culled Traditional Visibility Detection", "Culled adaptive grid with heuristic density and traditional QI calculation"},
|
||||
{FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL, "ADAPTIVETRADITIONAL", 0, "Unculled Traditional Visibility Detection", "Adaptive grid with heuristic density and traditional QI calculation"},
|
||||
{FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE, "CULLEDADAPTIVECUMULATIVE", 0, "Culled Cumulative Visibility Detection", "Culled adaptive grid with heuristic density and cumulative QI calculation"},
|
||||
{FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE, "ADAPTIVECUMULATIVE", 0, "Unculled Cumulative Visibility Detection", "Adaptive grid with heuristic density and cumulative QI calculation"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
{FREESTYLE_ALGO_VERYFAST, "VERYFAST", 0, "Very Fast Ray Casting",
|
||||
"Sample one FEdge in each ViewEdge; do not save list of occluders"},
|
||||
{FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL, "CULLEDADAPTIVETRADITIONAL", 0,
|
||||
"Culled Traditional Visibility Detection",
|
||||
"Culled adaptive grid with heuristic density and "
|
||||
"traditional QI calculation"},
|
||||
{FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL, "ADAPTIVETRADITIONAL", 0, "Unculled Traditional Visibility Detection",
|
||||
"Adaptive grid with heuristic density and traditional QI calculation"},
|
||||
{FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE, "CULLEDADAPTIVECUMULATIVE", 0,
|
||||
"Culled Cumulative Visibility Detection",
|
||||
"Culled adaptive grid with heuristic density and "
|
||||
"cumulative QI calculation"},
|
||||
{FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE, "ADAPTIVECUMULATIVE", 0, "Unculled Cumulative Visibility Detection",
|
||||
"Adaptive grid with heuristic density and cumulative QI calculation"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
/* FreestyleLineSet */
|
||||
|
||||
srna= RNA_def_struct(brna, "FreestyleLineSet", NULL);
|
||||
srna = RNA_def_struct(brna, "FreestyleLineSet", NULL);
|
||||
RNA_def_struct_ui_text(srna, "Freestyle Line Set", "Line set for associating lines and style parameters");
|
||||
|
||||
/* access to line style settings is redirected through functions */
|
||||
/* to allow proper id-buttons functionality */
|
||||
prop= RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE);
|
||||
/* access to line style settings is redirected through functions
|
||||
* to allow proper id-buttons functionality
|
||||
*/
|
||||
prop = RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "FreestyleLineStyle");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
|
||||
RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get", "rna_FreestyleLineSet_linestyle_set", NULL, NULL);
|
||||
RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get",
|
||||
"rna_FreestyleLineSet_linestyle_set", NULL, NULL);
|
||||
RNA_def_property_ui_text(prop, "Line Style", "Line style settings");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||
RNA_def_property_ui_text(prop, "Line Set Name", "Line set name");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
|
||||
prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENABLED);
|
||||
RNA_def_property_ui_text(prop, "Use", "Enable or disable this line set during stroke rendering");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_VISIBILITY);
|
||||
RNA_def_property_ui_text(prop, "Selection by Visibility", "Select feature edges based on visibility");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_EDGE_TYPES);
|
||||
RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select feature edges based on edge types");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_GROUP);
|
||||
RNA_def_property_ui_text(prop, "Selection by Group", "Select feature edges based on a group of objects");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_IMAGE_BORDER);
|
||||
RNA_def_property_ui_text(prop, "Selection by Image Border", "Select feature edges by image border (less memory consumption)");
|
||||
RNA_def_property_ui_text(prop, "Selection by Image Border",
|
||||
"Select feature edges by image border (less memory consumption)");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_FACE_MARK);
|
||||
RNA_def_property_ui_text(prop, "Selection by Face Marks", "Select feature edges by face marks");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
||||
RNA_def_property_enum_items(prop, edge_type_negation_items);
|
||||
RNA_def_property_ui_text(prop, "Edge Type Negation", "Set the negation operation for conditions on feature edge types");
|
||||
RNA_def_property_ui_text(prop, "Edge Type Negation",
|
||||
"Set the negation operation for conditions on feature edge types");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
||||
RNA_def_property_enum_items(prop, edge_type_combination_items);
|
||||
RNA_def_property_ui_text(prop, "Edge Type Combination", "Set the combination operation for conditions on feature edge types");
|
||||
RNA_def_property_ui_text(prop, "Edge Type Combination",
|
||||
"Set the combination operation for conditions on feature edge types");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "group");
|
||||
RNA_def_property_struct_type(prop, "Group");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Group", "A group of objects based on which feature edges are selected");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
||||
RNA_def_property_enum_items(prop, group_negation_items);
|
||||
RNA_def_property_ui_text(prop, "Group Negation", "Set the negation operation for conditions on feature edge types");
|
||||
RNA_def_property_ui_text(prop, "Group Negation",
|
||||
"Set the negation operation for conditions on feature edge types");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
||||
RNA_def_property_enum_items(prop, face_mark_negation_items);
|
||||
RNA_def_property_ui_text(prop, "Face Mark Negation", "Set the negation operation for the condition on face marks");
|
||||
RNA_def_property_ui_text(prop, "Face Mark Negation",
|
||||
"Set the negation operation for the condition on face marks");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
||||
RNA_def_property_enum_items(prop, face_mark_condition_items);
|
||||
RNA_def_property_ui_text(prop, "Face Mark Condition", "Set a feature edge selection condition on face marks");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SILHOUETTE);
|
||||
RNA_def_property_ui_text(prop, "Silhouette", "Select silhouette edges");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER);
|
||||
RNA_def_property_ui_text(prop, "Border", "Select border edges");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CREASE);
|
||||
RNA_def_property_ui_text(prop, "Crease", "Select crease edges");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE_VALLEY);
|
||||
RNA_def_property_ui_text(prop, "Ridge & Valley", "Select ridges and valleys");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
|
||||
RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive contours");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
|
||||
RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at material boundaries");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CONTOUR);
|
||||
RNA_def_property_ui_text(prop, "Contour", "Select contours");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
|
||||
RNA_def_property_ui_text(prop, "External Contour", "Select external contours");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EDGE_MARK);
|
||||
RNA_def_property_ui_text(prop, "Edge Mark", "Select edge marks");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SILHOUETTE);
|
||||
RNA_def_property_ui_text(prop, "Silhouette", "Exclude silhouette edges");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_BORDER);
|
||||
RNA_def_property_ui_text(prop, "Border", "Exclude border edges");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CREASE);
|
||||
RNA_def_property_ui_text(prop, "Crease", "Exclude crease edges");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE_VALLEY);
|
||||
RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and valleys");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
|
||||
RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive contours");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
|
||||
RNA_def_property_ui_text(prop, "Material Boundary", "Exclude edges at material boundaries");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CONTOUR);
|
||||
RNA_def_property_ui_text(prop, "Contour", "Exclude contours");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
|
||||
RNA_def_property_ui_text(prop, "External Contour", "Exclude external contours");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EDGE_MARK);
|
||||
RNA_def_property_ui_text(prop, "Edge Mark", "Exclude edge marks");
|
||||
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "qi");
|
||||
RNA_def_property_enum_items(prop, visibility_items);
|
||||
RNA_def_property_ui_text(prop, "Visibility", "Determine how to use visibility for feature edge selection");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED);
|
||||
prop = RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_int_sdna(prop, NULL, "qi_start");
|
||||
RNA_def_property_range(prop, 0, INT_MAX);
|
||||
RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED);
|
||||
prop = RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_int_sdna(prop, NULL, "qi_end");
|
||||
RNA_def_property_range(prop, 0, INT_MAX);
|
||||
RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range");
|
||||
@ -2608,93 +2645,94 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
|
||||
|
||||
/* FreestyleModuleSettings */
|
||||
|
||||
srna= RNA_def_struct(brna, "FreestyleModuleSettings", NULL);
|
||||
srna = RNA_def_struct(brna, "FreestyleModuleSettings", NULL);
|
||||
RNA_def_struct_sdna(srna, "FreestyleModuleConfig");
|
||||
RNA_def_struct_ui_text(srna, "Freestyle Module", "Style module configuration for specifying a style module");
|
||||
|
||||
prop= RNA_def_property(srna, "module_path", PROP_STRING, PROP_FILEPATH);
|
||||
prop = RNA_def_property(srna, "module_path", PROP_STRING, PROP_FILEPATH);
|
||||
RNA_def_property_string_sdna(prop, NULL, "module_path");
|
||||
RNA_def_property_ui_text(prop, "Module Path", "Path to a style module file");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1);
|
||||
RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
/* FreestyleSettings */
|
||||
|
||||
srna= RNA_def_struct(brna, "FreestyleSettings", NULL);
|
||||
srna = RNA_def_struct(brna, "FreestyleSettings", NULL);
|
||||
RNA_def_struct_sdna(srna, "FreestyleConfig");
|
||||
RNA_def_struct_nested(brna, srna, "SceneRenderLayer");
|
||||
RNA_def_struct_ui_text(srna, "Frestyle Settings", "Freestyle settings for a SceneRenderLayer datablock");
|
||||
|
||||
prop= RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_collection_sdna(prop, NULL, "modules", NULL);
|
||||
RNA_def_property_struct_type(prop, "FreestyleModuleSettings");
|
||||
RNA_def_property_ui_text(prop, "Style modules", "A list of style modules (to be applied from top to bottom)");
|
||||
|
||||
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, freestyle_ui_mode_items);
|
||||
RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle control mode");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "raycasting_algorithm", PROP_ENUM, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "raycasting_algorithm", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "raycasting_algorithm");
|
||||
RNA_def_property_enum_items(prop, freestyle_raycasting_algorithm_items);
|
||||
RNA_def_property_ui_text(prop, "Raycasting Algorithm", "Select the Freestyle raycasting algorithm");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_CULLING);
|
||||
RNA_def_property_ui_text(prop, "Culling", "If enabled, out-of-view edges are ignored");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_SUGGESTIVE_CONTOURS_FLAG);
|
||||
RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive contours");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_RIDGES_AND_VALLEYS_FLAG);
|
||||
RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and valleys");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_MATERIAL_BOUNDARIES_FLAG);
|
||||
RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material boundaries");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_FACE_SMOOTHNESS_FLAG);
|
||||
RNA_def_property_ui_text(prop, "Face Smoothness", "Take face smoothness into account in view map calculation");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_ADVANCED_OPTIONS_FLAG);
|
||||
RNA_def_property_ui_text(prop, "Advanced Edge Detection Options", "Enable advanced edge detection options (sphere radius and Kr derivative epsilon)");
|
||||
RNA_def_property_ui_text(prop, "Advanced Edge Detection Options",
|
||||
"Enable advanced edge detection options (sphere radius and Kr derivative epsilon)");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "sphere_radius");
|
||||
RNA_def_property_range(prop, 0.0, 1000.0);
|
||||
RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon");
|
||||
RNA_def_property_range(prop, -1000.0, 1000.0);
|
||||
RNA_def_property_ui_text(prop, "Kr Derivative Epsilon", "Kr derivative epsilon for computing suggestive contours");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE);
|
||||
prop = RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "crease_angle");
|
||||
RNA_def_property_range(prop, 0.0, DEG2RAD(180.0));
|
||||
RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold for detecting crease edges");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL);
|
||||
RNA_def_property_struct_type(prop, "FreestyleLineSet");
|
||||
RNA_def_property_ui_text(prop, "Line Sets", "");
|
||||
@ -3228,7 +3266,7 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
|
||||
|
||||
rna_def_freestyle_settings(brna);
|
||||
|
||||
prop= RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig");
|
||||
RNA_def_property_struct_type(prop, "FreestyleSettings");
|
||||
@ -3818,7 +3856,9 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
static EnumPropertyItem freestyle_thickness_items[] = {
|
||||
{R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"},
|
||||
{R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative", "Unit line thickness is scaled by the proportion of the present vertical image resolution to 480 pixels"},
|
||||
{R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative",
|
||||
"Unit line thickness is scaled by the proportion of the present vertical image "
|
||||
"resolution to 480 pixels"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
rna_def_scene_ffmpeg_settings(brna);
|
||||
@ -4065,10 +4105,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Edge Color", "Edge color");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS);
|
||||
RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
/* threads */
|
||||
prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
|
||||
|
@ -963,7 +963,7 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
|
||||
RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "freestyle_edge_mark", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
prop = RNA_def_property(srna, "freestyle_edge_mark", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Freestyle Edge Mark", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
@ -993,7 +993,7 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
|
||||
RNA_def_property_ui_text(prop, "Face Dot Size", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "freestyle_face_mark", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
prop = RNA_def_property(srna, "freestyle_face_mark", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 4);
|
||||
RNA_def_property_ui_text(prop, "Freestyle Face Mark", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
@ -231,7 +231,7 @@ static PyObject *bpy_import_test(const char *modname)
|
||||
else {
|
||||
PyErr_Print();
|
||||
PyErr_Clear();
|
||||
}
|
||||
}
|
||||
|
||||
return mod;
|
||||
}
|
||||
|
@ -1311,7 +1311,7 @@ int main(int argc, const char **argv)
|
||||
/* for all platforms, even windos has it! */
|
||||
if (G.background) signal(SIGINT, blender_esc); /* ctrl c out bg render */
|
||||
#endif
|
||||
|
||||
|
||||
/* background render uses this font too */
|
||||
BKE_vfont_builtin_register(datatoc_bfont_pfb, datatoc_bfont_pfb_size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user