2009-01-02 23:05:28 +00:00
|
|
|
/**
|
|
|
|
|
* $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.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation (2008).
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2009-01-03 01:55:37 +00:00
|
|
|
#include <float.h>
|
2009-06-03 23:22:43 +00:00
|
|
|
#include <stdio.h>
|
2009-01-03 01:55:37 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
2009-10-26 11:56:12 +00:00
|
|
|
#include "RNA_access.h"
|
2009-01-02 23:05:28 +00:00
|
|
|
#include "RNA_define.h"
|
|
|
|
|
#include "RNA_types.h"
|
|
|
|
|
|
|
|
|
|
#include "rna_internal.h"
|
|
|
|
|
|
2009-06-03 23:22:43 +00:00
|
|
|
#include "DNA_brush_types.h"
|
|
|
|
|
#include "DNA_lamp_types.h"
|
2009-01-03 08:08:44 +00:00
|
|
|
#include "DNA_material_types.h"
|
2009-01-02 23:05:28 +00:00
|
|
|
#include "DNA_texture_types.h"
|
2009-06-03 23:22:43 +00:00
|
|
|
#include "DNA_world_types.h"
|
2009-08-17 18:37:58 +00:00
|
|
|
#include "DNA_node_types.h"
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
#include "DNA_scene_types.h" /* MAXFRAME only */
|
2009-08-17 18:37:58 +00:00
|
|
|
|
|
|
|
|
#include "BKE_node.h"
|
2009-01-02 23:05:28 +00:00
|
|
|
|
2009-07-21 13:20:35 +00:00
|
|
|
static EnumPropertyItem texture_filter_items[] = {
|
2009-07-22 17:20:04 +00:00
|
|
|
{TXF_BOX, "BOX", 0, "Box", ""},
|
2009-07-21 13:20:35 +00:00
|
|
|
{TXF_EWA, "EWA", 0, "EWA", ""},
|
|
|
|
|
{TXF_FELINE, "FELINE", 0, "FELINE", ""},
|
|
|
|
|
{TXF_AREA, "AREA", 0, "Area", ""},
|
|
|
|
|
{TXF_SAT, "SAT", 0, "SAT (4x mem)", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-01-02 23:05:28 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
#include "BKE_depsgraph.h"
|
2009-07-21 12:57:55 +00:00
|
|
|
#include "BKE_texture.h"
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
#include "BKE_main.h"
|
|
|
|
|
|
2009-08-19 00:55:30 +00:00
|
|
|
#include "ED_node.h"
|
2009-07-21 12:57:55 +00:00
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
|
2009-03-23 11:08:01 +00:00
|
|
|
{
|
|
|
|
|
Tex *tex= (Tex*)ptr->data;
|
|
|
|
|
|
|
|
|
|
switch(tex->type) {
|
2009-03-23 11:10:07 +00:00
|
|
|
case TEX_CLOUDS:
|
2009-03-23 11:08:01 +00:00
|
|
|
return &RNA_CloudsTexture;
|
2009-03-25 14:42:47 +00:00
|
|
|
case TEX_WOOD:
|
2009-03-23 11:08:01 +00:00
|
|
|
return &RNA_WoodTexture;
|
|
|
|
|
case TEX_MARBLE:
|
|
|
|
|
return &RNA_MarbleTexture;
|
|
|
|
|
case TEX_MAGIC:
|
|
|
|
|
return &RNA_MagicTexture;
|
2009-04-09 20:33:39 +00:00
|
|
|
case TEX_BLEND:
|
|
|
|
|
return &RNA_BlendTexture;
|
2009-03-23 11:08:01 +00:00
|
|
|
case TEX_STUCCI:
|
|
|
|
|
return &RNA_StucciTexture;
|
2009-04-09 20:33:39 +00:00
|
|
|
case TEX_NOISE:
|
2009-03-23 11:08:01 +00:00
|
|
|
return &RNA_NoiseTexture;
|
|
|
|
|
case TEX_IMAGE:
|
|
|
|
|
return &RNA_ImageTexture;
|
|
|
|
|
case TEX_PLUGIN:
|
|
|
|
|
return &RNA_PluginTexture;
|
|
|
|
|
case TEX_ENVMAP:
|
|
|
|
|
return &RNA_EnvironmentMapTexture;
|
|
|
|
|
case TEX_MUSGRAVE:
|
|
|
|
|
return &RNA_MusgraveTexture;
|
|
|
|
|
case TEX_VORONOI:
|
|
|
|
|
return &RNA_VoronoiTexture;
|
|
|
|
|
case TEX_DISTNOISE:
|
2009-04-09 20:33:39 +00:00
|
|
|
return &RNA_DistortedNoiseTexture;
|
2009-08-13 05:21:25 +00:00
|
|
|
case TEX_POINTDENSITY:
|
|
|
|
|
return &RNA_PointDensityTexture;
|
|
|
|
|
case TEX_VOXELDATA:
|
|
|
|
|
return &RNA_VoxelDataTexture;
|
2009-03-23 11:08:01 +00:00
|
|
|
default:
|
|
|
|
|
return &RNA_Texture;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
static void rna_Texture_update(bContext *C, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Tex *tex= ptr->id.data;
|
|
|
|
|
|
|
|
|
|
DAG_id_flush_update(&tex->id, 0);
|
|
|
|
|
WM_event_add_notifier(C, NC_TEXTURE, tex);
|
|
|
|
|
}
|
|
|
|
|
|
2009-10-07 14:48:29 +00:00
|
|
|
static void rna_Texture_nodes_update(bContext *C, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Tex *tex= ptr->id.data;
|
|
|
|
|
|
|
|
|
|
DAG_id_flush_update(&tex->id, 0);
|
|
|
|
|
WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, tex);
|
|
|
|
|
}
|
|
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
static void rna_Texture_type_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
|
|
|
|
Tex *tex= (Tex*)ptr->data;
|
|
|
|
|
|
|
|
|
|
if (value == TEX_VOXELDATA) {
|
|
|
|
|
if (tex->vd == NULL) {
|
|
|
|
|
tex->vd = BKE_add_voxeldata();
|
|
|
|
|
}
|
|
|
|
|
} else if (value == TEX_POINTDENSITY) {
|
|
|
|
|
if (tex->pd == NULL) {
|
|
|
|
|
tex->pd = BKE_add_pointdensity();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tex->type = value;
|
|
|
|
|
}
|
|
|
|
|
|
2009-10-01 17:15:23 +00:00
|
|
|
void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
{
|
|
|
|
|
ID *id= ptr->id.data;
|
|
|
|
|
|
|
|
|
|
DAG_id_flush_update(id, 0);
|
|
|
|
|
|
|
|
|
|
switch(GS(id->name)) {
|
|
|
|
|
case ID_MA:
|
|
|
|
|
WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, id);
|
|
|
|
|
break;
|
|
|
|
|
case ID_WO:
|
|
|
|
|
WM_event_add_notifier(C, NC_WORLD, id);
|
|
|
|
|
break;
|
|
|
|
|
case ID_LA:
|
|
|
|
|
WM_event_add_notifier(C, NC_LAMP|ND_LIGHTING, id);
|
|
|
|
|
break;
|
|
|
|
|
case ID_BR:
|
|
|
|
|
WM_event_add_notifier(C, NC_BRUSH, id);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-10-26 11:56:12 +00:00
|
|
|
char *rna_TextureSlot_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
MTex *mtex= ptr->data;
|
|
|
|
|
|
|
|
|
|
/* if there is ID-data, resolve the path using the index instead of by name,
|
|
|
|
|
* since the name used is the name of the texture assigned, but the texture
|
|
|
|
|
* may be used multiple times in the same stack
|
|
|
|
|
*/
|
|
|
|
|
if (ptr->id.data) {
|
|
|
|
|
PointerRNA id_ptr;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
/* find the 'textures' property of the ID-struct */
|
|
|
|
|
RNA_id_pointer_create(ptr->id.data, &id_ptr);
|
|
|
|
|
prop= RNA_struct_find_property(&id_ptr, "textures");
|
|
|
|
|
|
|
|
|
|
/* get an iterator for this property, and try to find the relevant index */
|
|
|
|
|
if (prop) {
|
|
|
|
|
CollectionPropertyIterator iter;
|
|
|
|
|
int index= 0;
|
|
|
|
|
|
|
|
|
|
RNA_property_collection_begin(ptr, prop, &iter);
|
|
|
|
|
for(index=0; iter.valid; RNA_property_collection_next(&iter), index++) {
|
|
|
|
|
if (iter.ptr.data == ptr->id.data)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
RNA_property_collection_end(&iter);
|
|
|
|
|
|
|
|
|
|
/* did we find it? */
|
|
|
|
|
if (iter.valid)
|
|
|
|
|
return BLI_sprintfN("textures[%d]", index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* this is a compromise for the remaining cases... */
|
|
|
|
|
if (mtex->tex)
|
|
|
|
|
return BLI_sprintfN("textures[\"%s\"]", mtex->tex->id.name+2);
|
|
|
|
|
else
|
|
|
|
|
return BLI_strdup("textures[0]");
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-03 23:22:43 +00:00
|
|
|
static int rna_TextureSlot_name_length(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
MTex *mtex= ptr->data;
|
|
|
|
|
|
|
|
|
|
if(mtex->tex)
|
2009-06-07 13:09:18 +00:00
|
|
|
return strlen(mtex->tex->id.name+2);
|
2009-06-03 23:22:43 +00:00
|
|
|
|
2009-06-07 13:09:18 +00:00
|
|
|
return 0;
|
2009-06-03 23:22:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_TextureSlot_name_get(PointerRNA *ptr, char *str)
|
|
|
|
|
{
|
|
|
|
|
MTex *mtex= ptr->data;
|
|
|
|
|
|
|
|
|
|
if(mtex->tex)
|
2009-06-07 13:09:18 +00:00
|
|
|
strcpy(str, mtex->tex->id.name+2);
|
|
|
|
|
else
|
|
|
|
|
strcpy(str, "");
|
2009-06-03 23:22:43 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-18 19:58:27 +00:00
|
|
|
static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
MTex *mtex= ptr->data;
|
|
|
|
|
Tex *tex= mtex->tex;
|
|
|
|
|
int cur= mtex->which_output;
|
|
|
|
|
|
|
|
|
|
if(tex) {
|
|
|
|
|
bNodeTree *ntree= tex->nodetree;
|
|
|
|
|
bNode *node;
|
|
|
|
|
if(ntree) {
|
|
|
|
|
for(node= ntree->nodes.first; node; node= node->next) {
|
|
|
|
|
if(node->type == TEX_NODE_OUTPUT) {
|
|
|
|
|
if(cur == node->custom1)
|
|
|
|
|
return cur;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mtex->which_output= 0;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-08-17 18:37:58 +00:00
|
|
|
static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerRNA *ptr, int *free)
|
|
|
|
|
{
|
|
|
|
|
MTex *mtex= ptr->data;
|
|
|
|
|
Tex *tex= mtex->tex;
|
|
|
|
|
EnumPropertyItem *item= NULL;
|
|
|
|
|
int totitem= 0;
|
|
|
|
|
|
2009-10-14 19:19:43 +00:00
|
|
|
if(tex) {
|
2009-08-17 18:37:58 +00:00
|
|
|
bNodeTree *ntree= tex->nodetree;
|
2009-08-18 19:58:27 +00:00
|
|
|
if(ntree) {
|
2009-08-17 18:37:58 +00:00
|
|
|
EnumPropertyItem tmp= {0, "", 0, "", ""};
|
|
|
|
|
bNode *node;
|
|
|
|
|
|
|
|
|
|
tmp.value = 0;
|
|
|
|
|
tmp.name = "Not Specified";
|
|
|
|
|
tmp.identifier = "NOT_SPECIFIED";
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
|
|
|
|
|
for(node= ntree->nodes.first; node; node= node->next) {
|
|
|
|
|
if(node->type == TEX_NODE_OUTPUT) {
|
|
|
|
|
tmp.value= node->custom1;
|
|
|
|
|
tmp.name= ((TexNodeOutput*)node->storage)->name;
|
|
|
|
|
tmp.identifier = tmp.name;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
|
|
|
|
*free = 1;
|
2009-10-14 19:19:43 +00:00
|
|
|
|
2009-08-17 18:37:58 +00:00
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
2009-07-21 12:57:55 +00:00
|
|
|
static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
|
|
|
|
Tex *tex= (Tex*)ptr->data;
|
|
|
|
|
|
|
|
|
|
if(value) tex->flag |= TEX_COLORBAND;
|
|
|
|
|
else tex->flag &= ~TEX_COLORBAND;
|
|
|
|
|
|
|
|
|
|
if((tex->flag & TEX_COLORBAND) && tex->coba == NULL)
|
|
|
|
|
tex->coba= add_colorband(0);
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static void rna_Texture_use_nodes_set(PointerRNA *ptr, int v)
|
2009-08-17 18:37:58 +00:00
|
|
|
{
|
|
|
|
|
Tex *tex= (Tex*)ptr->data;
|
|
|
|
|
|
|
|
|
|
tex->use_nodes = v;
|
|
|
|
|
tex->type = 0;
|
|
|
|
|
|
2009-08-19 00:55:30 +00:00
|
|
|
if(v && tex->nodetree==NULL)
|
|
|
|
|
ED_node_texture_default(tex);
|
2009-08-17 18:37:58 +00:00
|
|
|
}
|
|
|
|
|
|
2009-07-21 13:20:35 +00:00
|
|
|
static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
|
|
|
|
Tex *tex= (Tex*)ptr->data;
|
|
|
|
|
|
|
|
|
|
if(value) tex->imaflag |= TEX_MIPMAP;
|
|
|
|
|
else tex->imaflag &= ~TEX_MIPMAP;
|
|
|
|
|
|
|
|
|
|
if((tex->imaflag & TEX_MIPMAP) && tex->texfilter == TXF_SAT)
|
2009-07-22 17:20:04 +00:00
|
|
|
tex->texfilter = TXF_EWA;
|
2009-07-21 13:20:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem *rna_ImageTexture_filter_itemf(bContext *C, PointerRNA *ptr, int *free)
|
|
|
|
|
{
|
|
|
|
|
Tex *tex= (Tex*)ptr->data;
|
|
|
|
|
EnumPropertyItem *item= NULL;
|
|
|
|
|
int totitem= 0;
|
|
|
|
|
|
2009-07-22 17:20:04 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_BOX);
|
2009-07-21 13:20:35 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_EWA);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_FELINE);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_AREA);
|
|
|
|
|
if(tex->imaflag & TEX_MIPMAP)
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, texture_filter_items, TXF_SAT);
|
|
|
|
|
|
|
|
|
|
*free= 1;
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
2009-01-02 23:05:28 +00:00
|
|
|
#else
|
|
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
static void rna_def_color_ramp_element(BlenderRNA *brna)
|
2009-01-06 00:56:20 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "ColorRampElement", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "CBData");
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Color Ramp Element", "Element defining a color at a position in the color ramp.");
|
2009-01-06 00:56:20 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "r");
|
|
|
|
|
RNA_def_property_array(prop, 4);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-06 00:56:20 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_COLOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "pos");
|
|
|
|
|
RNA_def_property_range(prop, 0, 1);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Position", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-06 00:56:20 +00:00
|
|
|
}
|
|
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
static void rna_def_color_ramp(BlenderRNA *brna)
|
2009-01-06 00:56:20 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_interpolation_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{1, "EASE", 0, "Ease", ""},
|
|
|
|
|
{3, "CARDINAL", 0, "Cardinal", ""},
|
|
|
|
|
{0, "LINEAR", 0, "Linear", ""},
|
|
|
|
|
{2, "B_SPLINE", 0, "B-Spline", ""},
|
|
|
|
|
{4, "CONSTANT", 0, "Constant", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-01-06 00:56:20 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "ColorRamp", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "ColorBand");
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color.");
|
2009-01-06 00:56:20 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR);
|
|
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "data", "tot");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorRampElement");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Elements", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-06 00:56:20 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "ipotype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_interpolation_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Interpolation", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-06 00:56:20 +00:00
|
|
|
}
|
|
|
|
|
|
2009-03-24 17:40:58 +00:00
|
|
|
static void rna_def_texmapping(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "TexMapping", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Texture Mapping", "Mapping settings");
|
|
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
|
2009-03-24 17:40:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "loc");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Location", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
|
2009-03-24 17:40:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rot");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Rotation", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
|
2009-03-24 17:40:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "size");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Scale", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_XYZ);
|
2009-03-24 17:40:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "min");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_XYZ);
|
2009-03-24 17:40:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "max");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "has_minimum", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Has Minimum", "Whether to use minimum clipping value");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "has_maximum", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Has Maximum", "Whether to use maximum clipping value");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-24 17:40:58 +00:00
|
|
|
}
|
|
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
static void rna_def_mtex(BlenderRNA *brna)
|
2009-01-03 08:08:44 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_blend_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{MTEX_BLEND, "MIX", 0, "Mix", ""},
|
|
|
|
|
{MTEX_ADD, "ADD", 0, "Add", ""},
|
|
|
|
|
{MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
|
|
|
|
|
{MTEX_MUL, "MULTIPLY", 0, "Multiply", ""},
|
|
|
|
|
{MTEX_SCREEN, "SCREEN", 0, "Screen", ""},
|
|
|
|
|
{MTEX_OVERLAY, "OVERLAY", 0, "Overlay", ""},
|
|
|
|
|
{MTEX_DIFF, "DIFFERENCE", 0, "Difference", ""},
|
|
|
|
|
{MTEX_DIV, "DIVIDE", 0, "Divide", ""},
|
|
|
|
|
{MTEX_DARK, "DARKEN", 0, "Darken", ""},
|
|
|
|
|
{MTEX_LIGHT, "LIGHTEN", 0, "Lighten", ""},
|
|
|
|
|
{MTEX_BLEND_HUE, "HUE", 0, "Hue", ""},
|
|
|
|
|
{MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
|
|
|
|
|
{MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
|
|
|
|
|
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
|
2009-09-10 03:00:50 +00:00
|
|
|
{MTEX_SOFT_LIGHT, "SOFT LIGHT", 0, "Soft Light", ""},
|
|
|
|
|
{MTEX_LIN_LIGHT , "LINEAR LIGHT", 0, "Linear Light", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-01-03 08:08:44 +00:00
|
|
|
|
2009-08-17 18:37:58 +00:00
|
|
|
static EnumPropertyItem output_node_items[] = {
|
|
|
|
|
{0, "DUMMY", 0, "Dummy", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-01-04 19:25:24 +00:00
|
|
|
srna= RNA_def_struct(brna, "TextureSlot", NULL);
|
2009-01-03 08:08:44 +00:00
|
|
|
RNA_def_struct_sdna(srna, "MTex");
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture.");
|
2009-10-26 11:56:12 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_TextureSlot_path");
|
2009-06-03 23:33:56 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
|
2009-01-03 08:08:44 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "tex");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Texture");
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-03 19:39:39 +00:00
|
|
|
|
2009-06-03 23:22:43 +00:00
|
|
|
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_funcs(prop, "rna_TextureSlot_name_get", "rna_TextureSlot_name_length", NULL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Name", "Texture slot name.");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_struct_name_property(srna, prop);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-06-03 23:22:43 +00:00
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
/* mapping */
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
|
2009-01-03 19:39:39 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ofs");
|
|
|
|
|
RNA_def_property_ui_range(prop, -10, 10, 10, 2);
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-03 19:39:39 +00:00
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_XYZ);
|
2009-01-03 19:39:39 +00:00
|
|
|
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-03 21:10:48 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "r");
|
|
|
|
|
RNA_def_property_array(prop, 3);
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-10 22:57:33 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "blendtype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_blend_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Blend Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-03 21:10:48 +00:00
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
prop= RNA_def_property(srna, "stencil", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-10 22:57:33 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "negate", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Negate", "Inverts the values of the texture to reverse its effect.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-10 22:57:33 +00:00
|
|
|
|
2009-07-14 04:13:04 +00:00
|
|
|
prop= RNA_def_property(srna, "rgb_to_intensity", PROP_BOOLEAN, PROP_NONE);
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT);
|
2009-07-14 04:13:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "RGB to Intensity", "Converts texture RGB values to intensity (gray) values.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-03 21:10:48 +00:00
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
|
2009-01-03 21:10:48 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "def_var");
|
2009-07-21 12:57:55 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
2009-01-03 21:10:48 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-06-07 12:34:38 +00:00
|
|
|
|
2009-08-17 18:37:58 +00:00
|
|
|
prop= RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "which_output");
|
|
|
|
|
RNA_def_property_enum_items(prop, output_node_items);
|
2009-08-18 19:58:27 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, "rna_TextureSlot_output_node_get", NULL, "rna_TextureSlot_output_node_itemf");
|
2009-08-17 18:37:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Output Node", "Which output node to use, for node-based textures.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
|
2009-01-03 08:08:44 +00:00
|
|
|
}
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
static void rna_def_filter_size_common(StructRNA *srna)
|
|
|
|
|
{
|
2009-04-10 18:03:24 +00:00
|
|
|
PropertyRNA *prop;
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
/* XXX: not sure about the name of this, "Min" seems a bit off */
|
|
|
|
|
prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_FILTER_MIN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Filter", "Use Filter Size as a minimal filter value in pixels");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "filtersize");
|
|
|
|
|
RNA_def_property_range(prop, 0.1, 50.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.1, 50.0, 1, 0.2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Filter Size", "Multiplies the filter size used by MIP Map and Interpolation");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_environment_map_common(StructRNA *srna)
|
2009-01-03 05:18:11 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_source_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{ENV_STATIC, "STATIC", 0, "Static", "Calculates environment map only once"},
|
|
|
|
|
{ENV_ANIM, "ANIMATED", 0, "Animated", "Calculates environment map at each rendering"},
|
|
|
|
|
{ENV_LOAD, "LOADED", 0, "Loaded", "Loads saved environment map from disk"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_source_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Source", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
/* XXX: move this to specific types if needed */
|
|
|
|
|
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ima");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Image");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Image", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_environment_map(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides."},
|
|
|
|
|
{ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image."},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-01-03 07:20:11 +00:00
|
|
|
srna= RNA_def_struct(brna, "EnvironmentMap", NULL);
|
2009-01-03 05:18:11 +00:00
|
|
|
RNA_def_struct_sdna(srna, "EnvMap");
|
2009-01-10 22:57:33 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "EnvironmentMap", "Environment map created by the renderer and cached for subsequent renders.");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
rna_def_environment_map_common(srna);
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "type");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clipsta");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.01, 50, 100, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clipend");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
2009-04-12 17:28:41 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "viewscale");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.5, 5, 100, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Zoom", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
/* XXX: EnvMap.notlay */
|
|
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
|
2009-01-03 05:18:11 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "cuberes");
|
|
|
|
|
RNA_def_property_range(prop, 50, 4096);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0, 5);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Depth", "Number of times a map will be rendered recursively (mirror effects.)");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
}
|
|
|
|
|
|
2009-03-23 11:10:07 +00:00
|
|
|
static EnumPropertyItem prop_noise_basis_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original", ""},
|
|
|
|
|
{TEX_STDPERLIN, "ORIGINAL_PERLIN", 0, "Original Perlin", ""},
|
|
|
|
|
{TEX_NEWPERLIN, "IMPROVED_PERLIN", 0, "Improved Perlin", ""},
|
|
|
|
|
{TEX_VORONOI_F1, "VORONOI_F1", 0, "Voronoi F1", ""},
|
|
|
|
|
{TEX_VORONOI_F2, "VORONOI_F2", 0, "Voronoi F2", ""},
|
|
|
|
|
{TEX_VORONOI_F3, "VORONOI_F3", 0, "Voronoi F3", ""},
|
|
|
|
|
{TEX_VORONOI_F4, "VORONOI_F4", 0, "Voronoi F4", ""},
|
|
|
|
|
{TEX_VORONOI_F2F1, "VORONOI_F2_F1", 0, "Voronoi F2-F1", ""},
|
|
|
|
|
{TEX_VORONOI_CRACKLE, "VORONOI_CRACKLE", 0, "Voronoi Crackle", ""},
|
|
|
|
|
{TEX_CELLNOISE, "CELL_NOISE", 0, "Cell Noise", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-23 11:10:07 +00:00
|
|
|
|
2009-03-25 14:42:47 +00:00
|
|
|
static EnumPropertyItem prop_noise_type[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_NOISESOFT, "SOFT_NOISE", 0, "Soft", ""},
|
|
|
|
|
{TEX_NOISEPERL, "HARD_NOISE", 0, "Hard", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
|
2009-03-23 11:10:07 +00:00
|
|
|
static void rna_def_texture_clouds(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2009-03-25 14:42:47 +00:00
|
|
|
static EnumPropertyItem prop_clouds_stype[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_DEFAULT, "GREYSCALE", 0, "Greyscale", ""},
|
|
|
|
|
{TEX_COLOR, "COLOR", 0, "Color", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
2009-03-23 11:10:07 +00:00
|
|
|
srna= RNA_def_struct(brna, "CloudsTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Clouds Texture", "Procedural noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
2009-03-25 14:42:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
|
|
|
|
|
RNA_def_property_range(prop, 0, INT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0, 6, 0, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_type);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_clouds_stype);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 0.1);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_wood(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_wood_stype[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_BAND, "BANDS", 0, "Bands", "Uses standard wood texture in bands"},
|
|
|
|
|
{TEX_RING, "RINGS", 0, "Rings", "Uses wood texture in rings"},
|
|
|
|
|
{TEX_BANDNOISE, "BANDNOISE", 0, "Band Noise", "Adds noise to standard wood"},
|
|
|
|
|
{TEX_RINGNOISE, "RINGNOISE", 0, "Ring Noise", "Adds noise to rings"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_wood_noisebasis2[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_SIN, "SIN", 0, "Sine", "Uses a sine wave to produce bands"},
|
|
|
|
|
{TEX_SAW, "SAW", 0, "Saw", "Uses a saw wave to produce bands"},
|
|
|
|
|
{TEX_TRI, "TRI", 0, "Tri", "Uses a triangle wave to produce bands"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "WoodTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Wood Texture", "Procedural noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "turbul");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:10:07 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
2009-03-25 14:42:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_type);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_wood_stype);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pattern", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noisebasis2", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_wood_noisebasis2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:10:07 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 0.1);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:10:07 +00:00
|
|
|
|
2009-03-25 14:42:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_marble(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_marble_stype[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_SOFT, "SOFT", 0, "Soft", "Uses soft marble"},
|
|
|
|
|
{TEX_SHARP, "SHARP", 0, "Sharp", "Uses more clearly defined marble"},
|
|
|
|
|
{TEX_SHARPER, "SHARPER", 0, "Sharper", "Uses very clearly defined marble"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_marble_noisebasis2[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_SIN, "SIN", 0, "Sin", "Uses a sine wave to produce bands"},
|
|
|
|
|
{TEX_SAW, "SAW", 0, "Saw", "Uses a saw wave to produce bands"},
|
|
|
|
|
{TEX_TRI, "TRI", 0, "Tri", "Uses a triangle wave to produce bands"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
2009-03-25 18:21:48 +00:00
|
|
|
srna= RNA_def_struct(brna, "MarbleTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Marble Texture", "Procedural noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
2009-03-25 14:42:47 +00:00
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "turbul");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
|
|
|
|
|
RNA_def_property_range(prop, 0, INT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0, 6, 0, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_type);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_marble_stype);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pattern", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-05-22 12:07:03 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noisebasis2", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_marble_noisebasis2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 0.1);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_magic(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "MagicTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Magic Texture", "Procedural noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "turbul");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
|
|
|
|
|
RNA_def_property_range(prop, 0, INT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0, 6, 0, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
}
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
static void rna_def_texture_blend(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_blend_progression[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_LIN, "LINEAR", 0, "Linear", "Creates a linear progression"},
|
|
|
|
|
{TEX_QUAD, "QUADRATIC", 0, "Quadratic", "Creates a quadratic progression"},
|
|
|
|
|
{TEX_EASE, "EASING", 0, "Easing", "Creates a progression easing from one step to the next"},
|
|
|
|
|
{TEX_DIAG, "DIAGONAL", 0, "Diagonal", "Creates a diagonal progression"},
|
|
|
|
|
{TEX_SPHERE, "SPHERICAL", 0, "Spherical", "Creates a spherical progression"},
|
|
|
|
|
{TEX_HALO, "QUADRATIC_SPHERE", 0, "Quadratic sphere", "Creates a quadratic progression in the shape of a sphere"},
|
|
|
|
|
{TEX_RAD, "RADIAL", 0, "Radial", "Creates a radial progression"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
2009-09-14 13:31:58 +00:00
|
|
|
static const EnumPropertyItem prop_flip_axis_items[]= {
|
|
|
|
|
{0, "HORIZONTAL", 0, "Horizontal", "Flips the texture's X and Y axis"},
|
|
|
|
|
{TEX_FLIPBLEND, "VERTICAL", 0, "Vertical", "Flips the texture's X and Y axis"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
srna= RNA_def_struct(brna, "BlendTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "progression", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_blend_progression);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Progression", "Sets the style of the color blending");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
2009-09-14 13:31:58 +00:00
|
|
|
prop= RNA_def_property(srna, "flip_axis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_flip_axis_items);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-09-14 13:31:58 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
2009-03-25 14:42:47 +00:00
|
|
|
static void rna_def_texture_stucci(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_stucci_stype[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_PLASTIC, "PLASTIC", 0, "Plastic", "Uses standard stucci"},
|
|
|
|
|
{TEX_WALLIN, "WALL_IN", 0, "Wall in", "Creates Dimples"},
|
|
|
|
|
{TEX_WALLOUT, "WALL_OUT", 0, "Wall out", "Creates Ridges"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "StucciTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Stucci Texture", "Procedural noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "turbul");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-05-22 12:07:03 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_type);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-25 14:42:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_stucci_stype);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pattern", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:10:07 +00:00
|
|
|
}
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
static void rna_def_texture_noise(BlenderRNA *brna)
|
2009-01-02 23:05:28 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
srna= RNA_def_struct(brna, "NoiseTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Noise Texture", "Procedural noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
}
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
static void rna_def_texture_image(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_image_extension[] = {
|
Rework of volume shading
After code review and experimentation, this commit makes some changes to the way that volumes are shaded. Previously, there were problems with the 'scattering' component, in that it wasn't physically correct - it didn't conserve energy and was just acting as a brightness multiplier. This has been changed to be more correct, so that as the light is scattered out of the volume, there is less remaining to penetrate through.
Since this behaviour is very similar to absorption but more useful, absorption has been removed and has been replaced by a 'transmission colour' - controlling the colour of light penetrating through the volume after it has been scattered/absorbed. As well as this, there's now 'reflection', a non-physically correct RGB multiplier for out-scattered light. This is handy for tweaking the overall colour of the volume, without having to worry about wavelength dependent absorption, and its effects on transmitted light. Now at least, even though there is the ability to tweak things non-physically, volume shading is physically based by default, and has a better combination of correctness and ease of use.
There's more detailed information and example images here:
http://wiki.blender.org/index.php/User:Broken/VolumeRendering
Also did some tweaks/optimisation:
* Removed shading step size (was a bit annoying, if it comes back, it will be in a different form)
* Removed phase function options, now just one asymmetry slider controls the range between back-scattering, isotropic scattering, and forward scattering. (note, more extreme values gives artifacts with light cache, will fix...)
* Disabled the extra 'bounce lights' from the preview render for volumes, speeds updates significantly
* Enabled voxeldata texture in preview render
* Fixed volume shadows (they were too dark, fixed by avoiding using the shadfac/AddAlphaLight stuff)
More revisions to come later...
2009-09-29 22:01:32 +00:00
|
|
|
{TEX_EXTEND, "EXTEND", 0, "Extend", "Extends by repeating edge pixels of the image"},
|
|
|
|
|
{TEX_CLIP, "CLIP", 0, "Clip", "Clips to image size and sets exterior pixels as transparent"},
|
|
|
|
|
{TEX_CLIPCUBE, "CLIP_CUBE", 0, "Clip Cube", "Clips to cubic-shaped area around the image and sets exterior pixels as transparent"},
|
|
|
|
|
{TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
|
|
|
|
|
{TEX_CHECKER, "CHECKER", 0, "Checker", "Causes the image to repeat in checker board pattern"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "ImageTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Image Texture", "");
|
2009-01-02 23:05:28 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "mipmap", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_MIPMAP);
|
2009-07-21 13:20:35 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_ImageTexture_mipmap_set");
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "MIP Map", "Uses auto-generated MIP maps for the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "mipmap_gauss", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_GAUSS_MIP);
|
|
|
|
|
RNA_def_property_ui_text(prop, "MIP Map Gauss", "Uses Gauss filter to sample down MIP maps");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "interpolation", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_INTERPOL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Interpolation", "Interpolates pixels using Area filter");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
/* XXX: I think flip_axis should be a generic Texture property, enabled for all the texture types */
|
|
|
|
|
prop= RNA_def_property(srna, "flip_axis", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_IMAROT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_USEALPHA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Alpha", "Uses the alpha channel information in the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "calculate_alpha", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_CALCALPHA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Calculate Alpha", "Calculates an alpha channel based on RGB values in the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:08:01 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE);
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_NEGALPHA);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Invert Alpha", "Inverts all the alpha values in the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
rna_def_filter_size_common(srna);
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "normal_map", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
/* XXX: mtex->normapspace "Sets space of normal map image" "Normal Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3"
|
|
|
|
|
* not sure why this goes in mtex instead of texture directly? */
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "extend");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_image_extension);
|
Rework of volume shading
After code review and experimentation, this commit makes some changes to the way that volumes are shaded. Previously, there were problems with the 'scattering' component, in that it wasn't physically correct - it didn't conserve energy and was just acting as a brightness multiplier. This has been changed to be more correct, so that as the light is scattered out of the volume, there is less remaining to penetrate through.
Since this behaviour is very similar to absorption but more useful, absorption has been removed and has been replaced by a 'transmission colour' - controlling the colour of light penetrating through the volume after it has been scattered/absorbed. As well as this, there's now 'reflection', a non-physically correct RGB multiplier for out-scattered light. This is handy for tweaking the overall colour of the volume, without having to worry about wavelength dependent absorption, and its effects on transmitted light. Now at least, even though there is the ability to tweak things non-physically, volume shading is physically based by default, and has a better combination of correctness and ease of use.
There's more detailed information and example images here:
http://wiki.blender.org/index.php/User:Broken/VolumeRendering
Also did some tweaks/optimisation:
* Removed shading step size (was a bit annoying, if it comes back, it will be in a different form)
* Removed phase function options, now just one asymmetry slider controls the range between back-scattering, isotropic scattering, and forward scattering. (note, more extreme values gives artifacts with light cache, will fix...)
* Disabled the extra 'bounce lights' from the preview render for volumes, speeds updates significantly
* Enabled voxeldata texture in preview render
* Fixed volume shadows (they were too dark, fixed by avoiding using the shadfac/AddAlphaLight stuff)
More revisions to come later...
2009-09-29 22:01:32 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Extension", "Sets how the image is extrapolated past its original bounds");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:08:01 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "xrepeat");
|
2009-04-12 17:28:41 +00:00
|
|
|
RNA_def_property_range(prop, 1, 512);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Repeat X", "Sets a repetition multiplier in the X direction");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "yrepeat");
|
2009-04-12 17:28:41 +00:00
|
|
|
RNA_def_property_range(prop, 1, 512);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Repeat Y", "Sets a repetition multiplier in the Y direction");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "mirror_x", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_XMIR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mirror X", "Mirrors the image repetition on the X direction");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "mirror_y", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_YMIR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mirror Y", "Mirrors the image repetition on the Y direction");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "checker_odd", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_ODD);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Checker Odd", "Sets odd checker tiles");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "checker_even", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_EVEN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Checker Even", "Sets even checker tiles");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "checker_distance", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "checkerdist");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 0.99);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0, 0.99, 0.1, 0.01);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Checker Distance", "Sets distance between checker tiles");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:08:01 +00:00
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
/* XXX: did this as an array, but needs better descriptions than "1 2 3 4"
|
|
|
|
|
perhaps a new subtype could be added?
|
|
|
|
|
--I actually used single values for this, maybe change later with a RNA_Rect thing? */
|
|
|
|
|
prop= RNA_def_property(srna, "crop_rectangle", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cropxmin");
|
|
|
|
|
RNA_def_property_array(prop, 4);
|
|
|
|
|
RNA_def_property_range(prop, -10, 10);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crop Rectangle", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-03-23 11:08:01 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
#endif
|
2009-03-23 11:08:01 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "crop_min_x", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cropxmin");
|
|
|
|
|
RNA_def_property_range(prop, -10.0, 10.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crop Minimum X", "Sets minimum X value to crop the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "crop_min_y", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cropymin");
|
|
|
|
|
RNA_def_property_range(prop, -10.0, 10.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crop Minimum Y", "Sets minimum Y value to crop the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "crop_max_x", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cropxmax");
|
|
|
|
|
RNA_def_property_range(prop, -10.0, 10.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crop Maximum X", "Sets maximum X value to crop the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "crop_max_y", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cropymax");
|
|
|
|
|
RNA_def_property_range(prop, -10.0, 10.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crop Maximum Y", "Sets maximum Y value to crop the image");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ima");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Image");
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-07-21 13:20:35 +00:00
|
|
|
|
2009-09-16 19:27:08 +00:00
|
|
|
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2009-07-21 13:20:35 +00:00
|
|
|
/* filtering */
|
|
|
|
|
prop= RNA_def_property(srna, "filter", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "texfilter");
|
|
|
|
|
RNA_def_property_enum_items(prop, texture_filter_items);
|
|
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageTexture_filter_itemf");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-07-21 13:20:35 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "filter_probes", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "afmax");
|
|
|
|
|
RNA_def_property_range(prop, 1, 256);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Filter Probes", "Maximum number of samples. Higher gives less blur at distant/oblique angles, but is also slower.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-07-21 13:20:35 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "filter_eccentricity", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "afmax");
|
|
|
|
|
RNA_def_property_range(prop, 1, 256);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Filter Eccentricity", "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_plugin(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "PluginTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Plugin", "External plugin texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
/* XXX: todo */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_environment_map(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "EnvironmentMapTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Environment Map", "Environment map texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
|
|
|
|
rna_def_environment_map_common(srna);
|
|
|
|
|
|
2009-09-16 19:27:08 +00:00
|
|
|
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "environment_map", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "env");
|
|
|
|
|
RNA_def_property_struct_type(prop, "EnvironmentMap");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Environment Map", "Gets the environment map associated with this texture");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
rna_def_filter_size_common(srna);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_musgrave(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_musgrave_type[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_MFRACTAL, "MULTIFRACTAL", 0, "Multifractal", ""},
|
|
|
|
|
{TEX_RIDGEDMF, "RIDGED_MULTIFRACTAL", 0, "Ridged Multifractal", ""},
|
|
|
|
|
{TEX_HYBRIDMF, "HYBRID_MULTIFRACTAL", 0, "Hybrid Multifractal", ""},
|
|
|
|
|
{TEX_FBM, "FBM", 0, "fBM", ""},
|
|
|
|
|
{TEX_HTERRAIN, "HETERO_TERRAIN", 0, "Hetero Terrain", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "MusgraveTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Musgrave", "Procedural musgrave texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
2009-03-23 11:08:01 +00:00
|
|
|
|
2009-05-22 12:07:03 +00:00
|
|
|
prop= RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stype");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_musgrave_type);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "highest_dimension", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mg_H");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, 2);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Highest Dimension", "Highest fractal dimension");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mg_lacunarity");
|
|
|
|
|
RNA_def_property_range(prop, 0, 6);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lacunarity", "Gap between succesive frequencies");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mg_octaves");
|
|
|
|
|
RNA_def_property_range(prop, 0, 8);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Octaves", "Number of frequencies used");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mg_offset");
|
|
|
|
|
RNA_def_property_range(prop, 0, 6);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Offset", "The fractal offset");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mg_gain");
|
|
|
|
|
RNA_def_property_range(prop, 0, 6);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Gain", "The gain multiplier");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
|
|
|
|
|
RNA_def_property_range(prop, 0, 10);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Intensity", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 0.1);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_voronoi(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_distance_metric_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_DISTANCE, "DISTANCE", 0, "Actual Distance", ""},
|
|
|
|
|
{TEX_DISTANCE_SQUARED, "DISTANCE_SQUARED", 0, "Distance Squared", ""},
|
|
|
|
|
{TEX_MANHATTAN, "MANHATTAN", 0, "Manhattan", ""},
|
|
|
|
|
{TEX_CHEBYCHEV, "CHEBYCHEV", 0, "Chebychev", ""},
|
|
|
|
|
{TEX_MINKOVSKY_HALF, "MINKOVSKY_HALF", 0, "Minkovsky 1/2", ""},
|
|
|
|
|
{TEX_MINKOVSKY_FOUR, "MINKOVSKY_FOUR", 0, "Minkovsky 4", ""},
|
|
|
|
|
{TEX_MINKOVSKY, "MINKOVSKY", 0, "Minkovsky", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
2009-05-26 02:49:46 +00:00
|
|
|
static EnumPropertyItem prop_coloring_items[] = {
|
2009-04-09 20:33:39 +00:00
|
|
|
/* XXX: OK names / descriptions? */
|
2009-06-16 00:52:21 +00:00
|
|
|
{TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity."},
|
|
|
|
|
{TEX_COL1, "POSITION", 0, "Position", "Color cells by position."},
|
|
|
|
|
{TEX_COL2, "POSITION_OUTLINE", 0, "Position and Outline", "Use position plus an outline based on F2-F.1"},
|
|
|
|
|
{TEX_COL3, "POSITION_OUTLINE_INTENSITY", 0, "Position, Outline, and Intensity", "Multiply position and outline by intensity."},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "VoronoiTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
|
2009-08-08 14:17:55 +00:00
|
|
|
prop= RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
|
2009-01-03 01:55:37 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vn_w1");
|
|
|
|
|
RNA_def_property_range(prop, -2, 2);
|
2009-08-08 14:17:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Weight 1", "Voronoi feature weight 1");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-08 14:17:55 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vn_w2");
|
|
|
|
|
RNA_def_property_range(prop, -2, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Weight 2", "Voronoi feature weight 2");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-08 14:17:55 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vn_w3");
|
|
|
|
|
RNA_def_property_range(prop, -2, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Weight 3", "Voronoi feature weight 3");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-08 14:17:55 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vn_w4");
|
|
|
|
|
RNA_def_property_range(prop, -2, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Weight 4", "Voronoi feature weight 4");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vn_mexp");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, 10);
|
2009-08-08 14:17:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Minkovsky Exponent", "Minkovsky exponent");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "vn_distm");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_distance_metric_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Distance Metric", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-05-26 02:49:46 +00:00
|
|
|
prop= RNA_def_property(srna, "coloring", PROP_ENUM, PROP_NONE);
|
2009-01-03 01:55:37 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "vn_coltype");
|
2009-05-26 02:49:46 +00:00
|
|
|
RNA_def_property_enum_items(prop, prop_coloring_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Coloring", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 01:55:37 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
|
2009-04-12 17:28:41 +00:00
|
|
|
RNA_def_property_range(prop, 0.01, 10);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Noise Intensity", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 0.1);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
static void rna_def_texture_distorted_noise(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
srna= RNA_def_struct(brna, "DistortedNoiseTexture", "Texture");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Distorted Noise", "Procedural distorted noise texture.");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-08-31 16:36:02 +00:00
|
|
|
prop= RNA_def_property(srna, "distortion", PROP_FLOAT, PROP_NONE);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dist_amount");
|
|
|
|
|
RNA_def_property_range(prop, 0, 10);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Distortion Amount", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noisesize");
|
|
|
|
|
RNA_def_property_range(prop, 0.0001, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
2009-08-20 17:59:37 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
|
2009-08-20 17:59:37 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
2009-04-10 18:03:24 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Noise Distortion", "Sets the noise basis for the distortion");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 0.1);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
static void rna_def_texture_pointdensity(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem point_source_items[] = {
|
|
|
|
|
{TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
|
|
|
|
|
{TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
|
2009-08-27 18:24:12 +00:00
|
|
|
//{TEX_PD_FILE, "FILE", 0 , "File", ""},
|
2009-08-13 05:21:25 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-08-27 18:24:12 +00:00
|
|
|
static EnumPropertyItem particle_cache_items[] = {
|
|
|
|
|
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
|
|
|
|
|
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
|
|
|
|
|
{TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem vertice_cache_items[] = {
|
|
|
|
|
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
|
|
|
|
|
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
|
|
|
|
|
{TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
static EnumPropertyItem falloff_items[] = {
|
|
|
|
|
{TEX_PD_FALLOFF_STD, "STANDARD", 0, "Standard", ""},
|
|
|
|
|
{TEX_PD_FALLOFF_SMOOTH, "SMOOTH", 0, "Smooth", ""},
|
|
|
|
|
{TEX_PD_FALLOFF_SOFT, "SOFT", 0, "Soft", ""},
|
|
|
|
|
{TEX_PD_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", "Density is constant within lookup radius"},
|
|
|
|
|
{TEX_PD_FALLOFF_ROOT, "ROOT", 0, "Root", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem color_source_items[] = {
|
|
|
|
|
{TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
|
|
|
|
|
{TEX_PD_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"},
|
|
|
|
|
{TEX_PD_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed", "Particle speed (absolute magnitude of velocity) mapped as 0.0-1.0 intensity"},
|
|
|
|
|
{TEX_PD_COLOR_PARTVEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "XYZ velocity mapped to RGB colors"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem turbulence_influence_items[] = {
|
|
|
|
|
{TEX_PD_NOISE_STATIC, "STATIC", 0, "Static", "Noise patterns will remain unchanged, faster and suitable for stills"},
|
|
|
|
|
{TEX_PD_NOISE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "Turbulent noise driven by particle velocity"},
|
|
|
|
|
{TEX_PD_NOISE_AGE, "PARTICLE_AGE", 0, "Particle Age", "Turbulent noise driven by the particle's age between birth and death"},
|
2009-08-27 18:24:12 +00:00
|
|
|
{TEX_PD_NOISE_TIME, "GLOBAL_TIME", 0, "Global Time", "Turbulent noise driven by the global current frame"},
|
2009-08-13 05:21:25 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "PointDensity", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "PointDensity");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings.");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "source");
|
|
|
|
|
RNA_def_property_enum_items(prop, point_source_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Point Source", "Point data to use as renderable point density");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
2009-08-17 22:09:36 +00:00
|
|
|
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "object");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-17 22:09:36 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "psys");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Particle System", "Particle System to render as points");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ParticleSystem");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-17 22:09:36 +00:00
|
|
|
|
2009-08-27 18:24:12 +00:00
|
|
|
prop= RNA_def_property(srna, "particle_cache", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "psys_cache_space");
|
|
|
|
|
RNA_def_property_enum_items(prop, particle_cache_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Particle Cache", "Co-ordinate system to cache particles in");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-27 18:24:12 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "vertices_cache", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "ob_cache_space");
|
|
|
|
|
RNA_def_property_enum_items(prop, vertice_cache_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Vertices Cache", "Co-ordinate system to cache vertices in");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-27 18:24:12 +00:00
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "radius");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Radius", "Radius from the shaded sample to look for points within");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "falloff_type");
|
|
|
|
|
RNA_def_property_enum_items(prop, falloff_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Falloff", "Method of attenuating density by distance from the point");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "falloff_softness", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "falloff_softness");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Softness", "Softness of the 'soft' falloff option");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "color_source", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "color_source");
|
|
|
|
|
RNA_def_property_enum_items(prop, color_source_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
2009-08-27 18:24:12 +00:00
|
|
|
prop= RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "speed_scale");
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 100.0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Scale", "Multipler to bring particle speed within an acceptable range");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-27 18:24:12 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "coba");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorRamp");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color Ramp", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-27 18:24:12 +00:00
|
|
|
|
|
|
|
|
/* Turbulence */
|
2009-08-13 05:21:25 +00:00
|
|
|
prop= RNA_def_property(srna, "turbulence", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_TURBULENCE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Turbulence", "Add directed noise to the density at render-time");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "turbulence_size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noise_size");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Size", "Scale of the added turbulent noise");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
2009-08-27 18:24:12 +00:00
|
|
|
prop= RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "noise_fac");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Strength", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-27 18:24:12 +00:00
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "noise_depth");
|
|
|
|
|
RNA_def_property_range(prop, 0, INT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noise_influence");
|
|
|
|
|
RNA_def_property_enum_items(prop, turbulence_influence_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Turbulence Influence", "Method for driving added turbulent noise");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
2009-08-27 18:24:12 +00:00
|
|
|
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "noise_basis");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_noise_basis_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Noise Basis", "Noise formula used for tubulence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-27 18:24:12 +00:00
|
|
|
|
|
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
srna= RNA_def_struct(brna, "PointDensityTexture", "Texture");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Point Density", "Settings for the Point Density texture");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "pointdensity", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "pd");
|
|
|
|
|
RNA_def_property_struct_type(prop, "PointDensity");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Point Density", "The point density settings associated with this texture");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_texture_voxeldata(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem interpolation_type_items[] = {
|
|
|
|
|
{TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor", "No interpolation, fast but blocky and low quality."},
|
2009-09-04 06:55:01 +00:00
|
|
|
{TEX_VD_LINEAR, "TRILINEAR", 0, "Linear", "Good smoothness and speed"},
|
|
|
|
|
{TEX_VD_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Mid-range quality and speed"},
|
|
|
|
|
{TEX_VD_TRICUBIC_CATROM, "TRICUBIC_CATROM", 0, "Cubic Catmull-Rom", "High quality interpolation, but slower"},
|
|
|
|
|
{TEX_VD_TRICUBIC_BSPLINE, "TRICUBIC_BSPLINE", 0, "Cubic B-Spline", "Smoothed high quality interpolation, but slower"},
|
2009-08-13 05:21:25 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-09-04 06:55:01 +00:00
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
static EnumPropertyItem file_format_items[] = {
|
|
|
|
|
{TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"},
|
|
|
|
|
{TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit greyscale binary data"},
|
2009-08-27 18:24:12 +00:00
|
|
|
//{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""},
|
2009-08-13 05:21:25 +00:00
|
|
|
{TEX_VD_IMAGE_SEQUENCE, "IMAGE_SEQUENCE", 0, "Image Sequence", "Generate voxels from a sequence of image slices"},
|
|
|
|
|
{TEX_VD_SMOKE, "SMOKE", 0, "Smoke", "Render voxels from a Blender smoke simulation"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
Rework of volume shading
After code review and experimentation, this commit makes some changes to the way that volumes are shaded. Previously, there were problems with the 'scattering' component, in that it wasn't physically correct - it didn't conserve energy and was just acting as a brightness multiplier. This has been changed to be more correct, so that as the light is scattered out of the volume, there is less remaining to penetrate through.
Since this behaviour is very similar to absorption but more useful, absorption has been removed and has been replaced by a 'transmission colour' - controlling the colour of light penetrating through the volume after it has been scattered/absorbed. As well as this, there's now 'reflection', a non-physically correct RGB multiplier for out-scattered light. This is handy for tweaking the overall colour of the volume, without having to worry about wavelength dependent absorption, and its effects on transmitted light. Now at least, even though there is the ability to tweak things non-physically, volume shading is physically based by default, and has a better combination of correctness and ease of use.
There's more detailed information and example images here:
http://wiki.blender.org/index.php/User:Broken/VolumeRendering
Also did some tweaks/optimisation:
* Removed shading step size (was a bit annoying, if it comes back, it will be in a different form)
* Removed phase function options, now just one asymmetry slider controls the range between back-scattering, isotropic scattering, and forward scattering. (note, more extreme values gives artifacts with light cache, will fix...)
* Disabled the extra 'bounce lights' from the preview render for volumes, speeds updates significantly
* Enabled voxeldata texture in preview render
* Fixed volume shadows (they were too dark, fixed by avoiding using the shadfac/AddAlphaLight stuff)
More revisions to come later...
2009-09-29 22:01:32 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem voxeldata_extension[] = {
|
|
|
|
|
{TEX_EXTEND, "EXTEND", 0, "Extend", "Extends by repeating edge pixels of the image"},
|
|
|
|
|
{TEX_CLIP, "CLIP", 0, "Clip", "Clips to image size and sets exterior pixels as transparent"},
|
|
|
|
|
{TEX_REPEAT, "REPEAT", 0, "Repeat", "Causes the image to repeat horizontally and vertically"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "VoxelData", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "VoxelData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "VoxelData", "Voxel data settings.");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "interp_type");
|
|
|
|
|
RNA_def_property_enum_items(prop, interpolation_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Interpolation", "Method to interpolate/smooth values between voxel cells");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
Rework of volume shading
After code review and experimentation, this commit makes some changes to the way that volumes are shaded. Previously, there were problems with the 'scattering' component, in that it wasn't physically correct - it didn't conserve energy and was just acting as a brightness multiplier. This has been changed to be more correct, so that as the light is scattered out of the volume, there is less remaining to penetrate through.
Since this behaviour is very similar to absorption but more useful, absorption has been removed and has been replaced by a 'transmission colour' - controlling the colour of light penetrating through the volume after it has been scattered/absorbed. As well as this, there's now 'reflection', a non-physically correct RGB multiplier for out-scattered light. This is handy for tweaking the overall colour of the volume, without having to worry about wavelength dependent absorption, and its effects on transmitted light. Now at least, even though there is the ability to tweak things non-physically, volume shading is physically based by default, and has a better combination of correctness and ease of use.
There's more detailed information and example images here:
http://wiki.blender.org/index.php/User:Broken/VolumeRendering
Also did some tweaks/optimisation:
* Removed shading step size (was a bit annoying, if it comes back, it will be in a different form)
* Removed phase function options, now just one asymmetry slider controls the range between back-scattering, isotropic scattering, and forward scattering. (note, more extreme values gives artifacts with light cache, will fix...)
* Disabled the extra 'bounce lights' from the preview render for volumes, speeds updates significantly
* Enabled voxeldata texture in preview render
* Fixed volume shadows (they were too dark, fixed by avoiding using the shadfac/AddAlphaLight stuff)
More revisions to come later...
2009-09-29 22:01:32 +00:00
|
|
|
prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "extend");
|
|
|
|
|
RNA_def_property_enum_items(prop, voxeldata_extension);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Extension", "Sets how the texture is extrapolated past its original bounds");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
|
|
|
|
|
2009-08-13 05:21:25 +00:00
|
|
|
prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "int_multiplier");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Intensity", "Multiplier for intensity values");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "file_format");
|
|
|
|
|
RNA_def_property_enum_items(prop, file_format_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "File Format", "Format of the source data set to render ");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "source_path", PROP_STRING, PROP_FILEPATH);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "source_path");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Source Path", "The external source data file to use");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "resol");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "still", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_VD_STILL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Still Frame Only", "Always render a still frame from the voxel data sequence");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "still_frame_number", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "still_frame");
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
|
2009-08-13 05:21:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Still Frame Number", "The frame number to always use");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
2009-08-16 06:10:31 +00:00
|
|
|
prop= RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
|
2009-08-13 05:21:25 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "object");
|
2009-08-16 06:10:31 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Domain Object", "Object used as the smoke simulation domain");
|
2009-08-13 05:21:25 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "VoxelDataTexture", "Texture");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Voxel Data", "Settings for the Voxel Data texture");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "voxeldata", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "vd");
|
|
|
|
|
RNA_def_property_struct_type(prop, "VoxelData");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Voxel Data", "The voxel data associated with this texture");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-13 05:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
static void rna_def_texture(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem prop_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "NONE", 0, "None", ""},
|
2009-10-15 13:47:18 +00:00
|
|
|
{TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""},
|
|
|
|
|
{TEX_IMAGE, "IMAGE", ICON_IMAGE_DATA, "Image or Movie", ""},
|
|
|
|
|
{TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_IMAGE_DATA, "Environment Map", ""},
|
2009-08-03 10:54:02 +00:00
|
|
|
{TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
|
|
|
|
|
{TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
|
|
|
|
|
{TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
|
|
|
|
|
{TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", ""},
|
|
|
|
|
{TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", ""},
|
|
|
|
|
{TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", ""},
|
|
|
|
|
{TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise", ""},
|
|
|
|
|
{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
|
|
|
|
|
{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
|
|
|
|
|
{TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
|
2009-08-13 05:21:25 +00:00
|
|
|
{TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
|
|
|
|
|
{TEX_VOXELDATA, "VOXEL_DATA", ICON_TEXTURE, "Voxel Data", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "Texture", "ID");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Tex");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Texture", "Texture datablock used by materials, lamps, worlds and brushes.");
|
2009-06-03 23:16:51 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_struct_refine_func(srna, "rna_Texture_refine");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
2009-08-03 10:54:02 +00:00
|
|
|
//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "type");
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_enum_items(prop, prop_type_items);
|
2009-08-13 05:21:25 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Type", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-03 10:54:02 +00:00
|
|
|
|
2009-07-21 12:57:55 +00:00
|
|
|
prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations.");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-07-21 12:57:55 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "coba");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorRamp");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color Ramp", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bright");
|
|
|
|
|
RNA_def_property_range(prop, 0, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Brightness", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-04-09 20:33:39 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.01, 5);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Contrast", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-10-05 15:59:12 +00:00
|
|
|
|
|
|
|
|
/* RGB Factor */
|
|
|
|
|
prop= RNA_def_property(srna, "factor_red", PROP_FLOAT, PROP_NONE);
|
2009-04-09 20:33:39 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rfac");
|
|
|
|
|
RNA_def_property_range(prop, 0, 2);
|
2009-10-05 15:59:12 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Factor Red", "");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "factor_green", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "gfac");
|
|
|
|
|
RNA_def_property_range(prop, 0, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Factor Green", "");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "factor_blue", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bfac");
|
|
|
|
|
RNA_def_property_range(prop, 0, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Factor Blue", "");
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_update");
|
2009-08-17 18:37:58 +00:00
|
|
|
|
|
|
|
|
/* nodetree */
|
|
|
|
|
prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_nodes_set");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Nodes", "Make this a node-based texture");
|
2009-10-07 14:48:29 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
|
2009-08-17 18:37:58 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based textures");
|
2009-10-07 14:48:29 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
|
2009-08-17 18:37:58 +00:00
|
|
|
|
2009-04-09 20:33:39 +00:00
|
|
|
rna_def_animdata_common(srna);
|
|
|
|
|
|
|
|
|
|
/* specific types */
|
|
|
|
|
rna_def_texture_clouds(brna);
|
|
|
|
|
rna_def_texture_wood(brna);
|
|
|
|
|
rna_def_texture_marble(brna);
|
|
|
|
|
rna_def_texture_magic(brna);
|
|
|
|
|
rna_def_texture_blend(brna);
|
|
|
|
|
rna_def_texture_stucci(brna);
|
|
|
|
|
rna_def_texture_noise(brna);
|
|
|
|
|
rna_def_texture_image(brna);
|
|
|
|
|
rna_def_texture_plugin(brna);
|
|
|
|
|
rna_def_texture_environment_map(brna);
|
|
|
|
|
rna_def_texture_musgrave(brna);
|
|
|
|
|
rna_def_texture_voronoi(brna);
|
|
|
|
|
rna_def_texture_distorted_noise(brna);
|
2009-08-13 05:21:25 +00:00
|
|
|
rna_def_texture_pointdensity(brna);
|
|
|
|
|
rna_def_texture_voxeldata(brna);
|
2009-04-09 20:33:39 +00:00
|
|
|
/* XXX add more types here .. */
|
2009-03-23 11:08:01 +00:00
|
|
|
}
|
2009-01-03 05:18:11 +00:00
|
|
|
|
2009-03-23 11:08:01 +00:00
|
|
|
void RNA_def_texture(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
rna_def_texture(brna);
|
2009-01-10 22:57:33 +00:00
|
|
|
rna_def_mtex(brna);
|
|
|
|
|
rna_def_environment_map(brna);
|
|
|
|
|
rna_def_color_ramp(brna);
|
|
|
|
|
rna_def_color_ramp_element(brna);
|
2009-03-24 17:40:58 +00:00
|
|
|
rna_def_texmapping(brna);
|
2009-01-02 23:05:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|