[Bf-committers] A VoxelSculpt question (Farsthary)

Andrea Weikert andrea at aweikert.de
Fri Sep 25 19:57:13 CEST 2009


Hola Raul,

It's not difficult, instead of inserting any icon in UI_icons.h, you 
just rename one of the blank icons, for example ICON_BLANK063 or so.
Then you need to figure out, where this icon is in the 
release/datafiles/blenderbuttons - it's a png file, which you will see 
if you rename it to blenderbuttons.png. This is not too difficult to see 
as the icons are in the same order as they are defined in the UI_icons.h.

hope this helps,
Andrea

Raul Fernandez Hernandez schrieb:
> 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
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>   



More information about the Bf-committers mailing list