[Bf-committers] A VoxelSculpt question (Farsthary)

Raul Fernandez Hernandez raulf at info.upr.edu.cu
Fri Sep 25 18:26:23 CEST 2009


Hi all :)

  Currently I´m implementing the new mode ¨Voxel Sculpt¨ aviable only for
VoxelObjects but i´m facing a problem with the UI and icons:

   the file view3d_header.c have this definitions for mode selection

//---------------------------------------------------------------------
 /* View3d->modeselect
 * This is a bit of a dodgy hack to enable a 'mode' menu with icons+labels
 * rather than those buttons.
 * I know the implementation's not good - it's an experiment to see if this
 * approach would work well
 *
 * This can be cleaned when I make some new 'mode' icons.
 */

#define V3D_OBJECTMODE_SEL			ICON_OBJECT_DATA
#define V3D_EDITMODE_SEL			ICON_EDITMODE_HLT
#define V3D_SCULPTMODE_SEL			ICON_SCULPTMODE_HLT
#define V3D_FACESELECT_SEL			ICON_FACESEL_HLT	/* this is not a mode
anymore - just a switch */
#define V3D_VERTEXPAINTMODE_SEL		ICON_VPAINT_HLT
#define V3D_TEXTUREPAINTMODE_SEL	ICON_TPAINT_HLT
#define V3D_WEIGHTPAINTMODE_SEL		ICON_WPAINT_HLT
#define V3D_POSEMODE_SEL			ICON_POSE_HLT
#define V3D_PARTICLEEDITMODE_SEL	ICON_ANIM
#define V3D_VOXELSCULPT_SEL             ICON_VOXELSCULPT_HLT  /* For Voxel
Sculpt mode */

//---------------------------------------------

I have added the last one that need the new icon ICON_VOXELSCULPT_HLT, and
in the file UI_icons.h there´s seems to be the definition for those icons,
so I need to insert the definition: DEF_ICON(ICON_SCULPTMODE_HLT)
somewhere that list, but again that list seems to be a direct mapping to
some icons resource file because random insertion will alter all the icon
mappings in Blender. I don´t know how that icon system work, how could I
do to add the new icon and define its mapping?

 Perhaps that question is easy to solve or have being rised many times but
I will preciate any help.

                           Best Regards     Farsthary



More information about the Bf-committers mailing list