Commit Graph

53 Commits

Author SHA1 Message Date
Garux df02774ff5 tweak StringOutputStream use
auto str = StringOutputStream()(bla) use form was not doing copy elision or move, but copy
2024-01-29 16:54:08 +06:00
Garux f7b9e7e482 fix nonmodal dialogs going behind main window in linux
notes:
was okay in windows
wnd position is not preserved on hiding via Close event now, requires extra handling, as in class RotateDialog or g_guiSettings (no much critical cases exist)
min max buttons aren't shown (when requested) in Ubuntu, shown in Windows; were shown for Qt::Window flag
2022-10-31 15:16:53 +03:00
Garux 9d3d204018 Qt 2022-10-27 09:10:31 +03:00
Garux da98e8fde3 various code cleanups 2021-10-30 16:04:31 +03:00
Garux da98f5f9d9 add and use Entity::getClassName(), Entity::hasKeyValue()
do not return default value from getKeyValue()
2021-05-16 10:13:42 +03:00
Garux 2222100316 indent classes, align by spaces 2021-03-24 00:25:15 +03:00
Garux 2944cff834 * entity inspector: select entities by key, value, key+value buttons
replaces and complements obscure behavior of SelectAllOfType with entity inspector shown
2020-08-19 08:23:04 +03:00
Garux 0140da6e72 only #include <gtk/gtk.h> 2020-05-21 16:27:17 +03:00
Garux e1a145c234 remove excess (GdkModifierType) casts 2020-05-19 21:40:52 +03:00
Garux 0831e0966d Replace GDK_<keyname> with GDK_KEY_<keyname> 2020-05-19 21:15:11 +03:00
Thomas Debesse 66e6781c9b use Instance_isSelected() function 2020-03-03 02:00:15 +03:00
Garux 4e82cdf2f4 shorten code 2019-08-23 19:21:39 +03:00
Garux adc6adf50e delete duplicate code, enable search in find/replace dialog in selected in component mode 2018-11-23 16:50:27 +03:00
Garux 07bc303c2d * arbitrary rotation dialog fix: also handle extra precision of values on execution by button press 2018-10-21 23:01:12 +03:00
Garux afdf2a76e0 make Scene_BoundsSelected lazily evaluatable 2018-08-19 16:40:48 +03:00
Garux 7908a2b593 simplify TextureBrowser_GetSelectedShader, TextureBrowser_SetSelectedShader usage
assuming, that we have only TextureBrowser
2018-08-03 17:32:57 +03:00
Garux cc997fd5a1 * fix clone, clone-make-unique, select all of type, expand selection to entities/primitives for maps w/o worldspawn 2018-07-27 19:11:53 +03:00
Garux 17a7e2f413 * replace reGroup command with simpler to use Move Primitives to Entity one (select primitives to move, select target entity primitive, go)
fix crashes in Entity_ungroupSelected, Entity_connectSelected
rename entity commands uniformly for simpler search in the list
2018-05-24 18:21:38 +03:00
Garux c878333c7b * m2 in Surface Inspector->fit width/height = fit width/height, keep height/width 2018-02-19 17:28:05 +03:00
Garux 1f31e94aca undo 'numeric GtkSpinButtons in SI, arbitrary rotation dialog' (aint flexible enough for input) 2018-02-04 20:56:45 +03:00
Garux 4511d1b5b1 * deselect components on HideSelected(): could be texturized or edited implicitly 2017-11-11 11:58:33 +03:00
Garux 1658f27ee6 * Valve220: keep basis on 'paintTexture&Projection' (shift+m3); 'projectTexture' (ctrl+shift+m3) performs basis copy 2017-11-10 14:56:35 +03:00
Garux 5761c6006b GtkSpinButtons are numeric only in SI, arbitrary rotation dialog, preferences
SI: fit: fewer trailing zeros
SI: rotate: page_increment = 45 (activatable by scroll click on arrows; RMB = min/max)
2017-10-19 21:51:22 +03:00
Garux 6eee961fcc Radiant:
binds...
	* shift + m3: apply texture name and alignment to selected primitives and faces (m3 was inconsistent + often required quite deep planning)
	* ctrl + shift + m3: also project tex from face to selection

misc...
	* lazy cursor updates in clipper mode
	* update cursor immediately on clipper mode toggles
	* fixes and optimizations of entity names rendering; for instance: don't prerender textures for unneeded names

	FBO overlay fixes
2017-08-02 09:53:07 +03:00
Garux da43652df1 Radiant:
binds...
	* ctrl + shift + m3/drag: project tex from face in tex clipboard to brushes(BP format) and curves

misc...
	* fixed and improved normal finding in patch texture autocap algorithm
	* removed axis cycling in patch cap texture; using autocap
	* patch cap texture: project, using brush texture projection math of current mapformat to make it seamless with brushes by default
	* Surface inspector->Project functions work for curves (in AP map format too)
2017-08-02 09:47:05 +03:00
Garux b0c4caa9d1 Radiant:
binds...
	* m3: apply texture name and alignment to selected primitives and faces
	cleaning
2017-08-02 09:46:24 +03:00
Garux a102c41b48 Radiant:
misc...
	* changed surface inspector behavior from 'set whole texture projection' to 'set modified value' (makes sense for multiple surfaces selected)
	* BP: surface inspector and Tex* binds scale texture by its axes, not world axes
	* BP: fix rotation of tex projection with scale S != scale T
	* BP: fix ruining nonregular tex projections by surface inspector (for example after fit/seamless/arbitrary projection)
	* jump over tex projection scale = 0 case, while modifying one (AP and BP)
2017-08-02 09:45:26 +03:00
Garux 492f00b729 Radiant:
misc...
	* fix scaling for doom3 brush format
	* Pointfile function: try to also load .pts leak line file (q1), if .lin isn't found
	* snap transform origin for flip commands
	* change light intensity save format from %f to %g to prevent .99999 on transforms
	* support 'stupid quake bug' (invert pitch in angles)(generic and miscmodel ents)(cfg: entities="quake" in .game)
	* clipper: place 1st and 2nd points far, 3rd near to ease 3 points clipping
2017-08-02 09:44:51 +03:00
Garux 9613511560 Radiant:
binds...
	* m2 drag in cam = sideways+updownways strafemode; do not enter/quit freelook, if long button press (>300ms)
	* m1 drag in freelook = sideways+updownways strafemode (mainly for visual editing)
	* ctrl + m3/drag = seamless brush face to face texture paste; works for any faces in BP mode, only axial ones in AP
	* ctrl + shift + a: select all visible brush faces and curves, textured by selected shader
		(more obvious way, than existing ones: components mode::faces->shift+a and find/replace to empty)
	* shift during creating brush = quadratic brush
	* drag clipper point + shift = constrain to axis with biggest move amount

misc...
	* -gamedetect command line option to enable game detection
	* don't disable aero by default; -aero command line option disables one
	* "Don't show" (during session) checkbox in Light Intensity dialog
	* fix: show-grid toggle hides grid, when snap-to-grid is off too
	* region mode: draw out of region part of grid in subtle style
	texbro tags button png icon
2017-08-02 09:42:58 +03:00
Garux 7e36f12449 Radiant:
binds...
	* Tab + mWheel in freelook: offset focus distance with dist2origin/8 step; exponentially, if moving far away

menus...
	* Misc->Colors->Themes->Blender/Dark color theme
misc...
	* surface inspector: renamed poorly named Axial button to Reset
	* arbitrary brush texture projections in brush primitives map format: axial, from ortho view, from cam
	* frame 2 frame time render stat
	* renamed confusingly named command GroupSelection to RegroupSelection
	* fix: changing clipper color via theme loading doesn't require restart
	* fix: changing CameraSelectedBrushColor, SelectedBrushColor don't require restart
2017-08-02 09:42:08 +03:00
Garux 697d2714d6 Radiant:
binds...
	* ctrl + e: ExpandSelectionToPrimitives (select group entities w/o parent node)
	* ctrl + m3 texture painting by drag
misc...
	* fix: QNAN texture projection after scaling cuboid on Z axis (brush primitives + texture lock)
	* preferences->display->entities->Names Display Distance (in cam) def = 512u
	* always show selected/childSelected entity names (unselected is optional)
	* fix: mouse texture grab/paint commands ignore filtered faces (caulk filter)
2017-08-02 09:39:45 +03:00
Garux 471fca65b6 Radiant:
binds...
	* ctrl + shift + v: MoveToCamera (translate selection to camera origin)
	* m2 in entities creation menu: change classname

misc...
	* do not delete selected on entities creation, just deselect
	* ExpandSelectionToEntities: do not select invisible nodes
	* fix: keep stuff on grid after paste/move to camera commands, if stuff's size is (2*N + 1)*gridSize
	* MapName build system variable (can use to make build menu entry to run map in a game)
	* build->customize: list available build variables
	* texture browser: gtk search in directories and tags trees
	* fix: build menu->customize Cancel button cancels (was reloading menu from disk)
	* build menu->customize Reset button (= reload menu from disk = editor start state)
2017-08-02 09:23:14 +03:00
Garux c92c662abb Radiant:
binds...
	* Tab in freelook: smooth turn around selected, while focusing on one

misc...
	* activate key_press_handler before special_key_press_handler to allow CameraFree* commands, bound to special (gtk: !accelerator_is_valid) keys
	* update workzone on partial deselecting too (was updating only on adding to selection)
2017-08-02 09:22:10 +03:00
Garux dfce2da577 Q3map2:
disable fastnormalize for light: was increasing dirt from arealights, lighting with acute angle

Radiant:

binds...
	* QE tool: alt + m1 drag in primitives mode:
		click face = clicked faces shear
	* m3 in texbro: select texture w/o applying to selection
	* `: XYFocusOnSelected
	* ctrl + shift + e: Select Connected Entities
misc...
	* search in shortcuts list
	* edit shortcuts on m1 dbl click
	* edit shortcuts fix: could highlight a few rows for editing
	* texbro: toggle off hideUnused on loading a tag
	* fix of: undo something, select tex in texbro, no redo available
	* epsilon in resize brush selector to prevent perpendicular faces pickup
	* clone group entity primitives to separate entity on cloneSelectedMakeUnique
	* Focus on Selected option in Entity List (focus cam and center xy)
	* entity inspector: connected entities walker (select target / targeting / both)(focus)
2017-08-02 09:21:32 +03:00
Garux 2ab47003e0 Radiant:
misc...
	* regular gtk search in entity inspector -> entity class list
	* fix: entities, converted to ( targeted + having model + not loaded b4 ) ones weren't selectable normally + rendered only while 0 0 0 was visible
	* ExpandSelectionToEntities works, if only parent node is selected, too (via entity list)
	* Select & normalize color commands work for group ents, if contained primitive is selected
	* remove boolean key, if set via entity inspector checkbox to 0 (ex: light - sun checkbox: was _sun 0, if off)
2017-08-02 09:19:53 +03:00
Garux 0261afc6df Q3map2:
* -backsplash (float)scale (float)distance: scale area lights backsplash fraction + set distance globally
		(distance < -900 to omit distance setting); def = 1 23; real area lights have no backsplash (scale = 0)
		q3map_backsplash shader keyword overrides this setting

Radiant:

binds...
	* alt + m1 click/drag in component modes: select objects
misc...
	* fix: selected entity and brush numbers display in 'Find brush' dialog
	* prefer to display texture width and height in status bar over name (PANGO_ELLIPSIZE_START)
	* allow search shortcut (ctr+f in win) in entity inspector -> entity class list
	* fix: don't save empty group entities (but worldspawn)
2017-08-02 09:19:22 +03:00
Garux 3a78d90201 Radiant:
binds...
	* m1 + shift drag: snapped modes of manipulators:
		freedrag: constrain to axis with biggest move amount
		rotate axis: snap to angles, multiple of 15'
		scale axis: scale all axes synchronously
		scale free: scale axes with non zero drag synchronously (i.e. two visible ones in projection views)
misc...
	* fix: CameraFreeMoveUp, CameraFreeMoveDown shortcuts are editable
	* prism, cone prefabs: increased precision
	* fix: out of pivot rotating is active from start, no additional magic is needed for that
	* fix: could lock (but not set) transform origin in non-pivoted mode
	* arbitrary rotation dialog allows decimals
	* fix: grid rendering with ToggleGridSnap off
	* fix of: scale tool scale, locked to 1 for things w/o bbox with bigger grid (e.g. single misc_model)
		(snapped drag start was = 0, scale func depends on initial click point: closer to center = more extreme scaling)
	* fix: make detail / structural are undoable
	* default autosave period: 5 -> 15 minutes
	* texBro option: hide nonShaders in common folder; def = yes; are shown, if are in use
2017-08-02 09:10:43 +03:00
Garux c845c5cd8f Radiant:
binds...
	* Tab: focus camera on selected

menus...
	* Modify->Nudge:+ Nudge +Z, Nudge -Z

misc...
	* improvement of: Scale tool: now scales bbox by gridsize increment
	* snap transform origin for rotate 90' commands, if one is not custom (is good to stay on grid)
	* 2d camera icon in ZY, ZX views represents yaw aswell
	* M3 camera direction control: disabled snapping
	* M3 camera direction control: affect yaw instead of doing pitch > 90' in ZY, ZX views
	* fix of: ctrl+m3 in 2d, release ctrl, then m3: m3 drag works like with ctrl pressed
	* removed 2 buttons mouse option: was only affecting m3 camera control binds
	* fix of: press any modifier (ctrl/shift/alt) + any mouse, release modifier, then mouse = chase mouse broken
	* removed 'Right Button Activates Context Menu' preference
	* brushExport plugin, prtview plugin, bobToolz::Polygon Builder, about, textures reset, messagebox windows live on top of main window
	* removed 'Update views on camera move' option: camera icon updating is enough quick
	* fix: bobToolz::split patch rows+columns - works if rows = 3 ( clos and rows were mixed up in general )
	* entitySetColour, entityNormalizeColour are undoable
	* bobToolz::splitPatch commands place result into parent entity (worldspawn or group one)
	* bobToolz::mergePatches places result into last selected patch's parent entity
	* bobToolz::mergePatches: remove left empty group entities
	* SelectAllOfType works for group entities, whose brush(es) are selected (no parent node selection needed).
		Algorithm is: get [ent inspector's keyName field(if visible) or classname]'s keyValues of selected ents ('no key' counts, as property, too);
		Then select ents with according keyName+keyValues; Worldspawn is omitted;
		Otherwise (nothing or worldspawn selected) select primitives, holding selected texture;
		in 'Faces' component mode = select specifically faces, holding selected texture;
	* SelectAllOfType selects child primitives of group entities
	* ExpandSelectionToEntities works for worldspawn entity too
2017-08-02 09:09:58 +03:00
Garux 322b0c2ee4 Radiant:
misc...
	* shader editor lives on top of main window
	* csg tool: 'active projection' exclusion method instead of axis selection
	* csg tool: new 'selected faces' & 'cam direction' exclusion methods
	* new active projection dependent commands MirrorSelectionHorizontally, MirrorSelectionVertically,
		RotateSelectionClockwise, RotateSelectionAnticlockwise + toolbar buttons
2017-08-02 09:09:20 +03:00
Garux 5a8c27d93c menus...
* view->show: toggle crosshair, size, grid are check menu items
	* view->show: +Show Light Radiuses toggle
	* view->show->show stats makes effect immediately
	* view->show fix: check menu items are sensitive to changing options via shortcuts

misc...
	* option to disable main toolbar
	* removed bobtoolz caulk selection button; filterbar one does the job better
	* filterbar: + region set selected button; rightclick = region off
	* filterbar: + hide selected button; rightclick = show hidden
	* SelectionSystem option: prefer point entities in 2D views (def = yes)
	* filterbar: indicate region, hide states by buttons states
	* fix: region compiles (run build with region enabled = compile regioned part only)
	* solid selection boxes by default (m_bNoStipple)
	* always use stipple for stuff behind stuff in 3d (was dependent on m_bNoStipple)
	* del unused ChooseSmallGridMajorColor ChooseSmallGridMinorColor preferences pipeline
	* fix: Active View Name and Outline... Clipper... colors saving
	* fix: ChooseCameraSelectedBrushColor changes the color (requires restart)
	* fix: ChooseSelectedBrushColor preference saving (requires restart)
	* fix rubberband selector appearence in 2D with 'show window outline' option enabled
	* multiple projections layouts: activate a projection on zoom
	* multiple projections layouts: added wnds updates to correctly indicate active projection (via wnd outline and projection name)
	* draw projection name is independent from show coordinates option
	* multiple projections layouts: greyscale axes in inactive views
	* 'show coordinates' is disabled by default
	* quick (hacky) method to render things, indicating viewport being active or not (axes, view name, wnd outline)
2017-08-02 09:07:44 +03:00
Garux dce6730b39 Radiant:
misc...
	* fix: select inside and touching: ignored ANY filters and hiding, and region
	* fix: M3 tex paint/grab ignored _hidden_ models
	* fix: M3 tex paint/grab ignored group ent (world, triggers, et cetera), model filters
	* fix: shift+a by tex: ignored group ent (world, triggers, et cetera) filters
	* fix: tex find/replace: ignored any filters, regioning & hiding
	* fix: shift+a by classname: ignored filters, hiding, region
	* fix: floor walker ignored group ent filters
	* fix: csg subtract ignored group ent filters
	* fix: invert selection: ignored group ent filters
	* fix: tex find/replace: 'select by shader' mode for patches (was replacing with notex instead)
	* fix: select inside and touching: were selecting group ents, as single unit (=sensitive to parent node and its bbox)
	* fix: csg merge two group ents = empty group ent
	* fix: csg subtract group ent completely = empty group ent
	* fix: hollow group ent: could produce empty group ent
	* func_groups are filtered by world filter only, not entities one
	* new func_group filter, filterBar button; Rightclick = create func_group
2017-08-01 14:27:03 +03:00
Garux 6592d65469 Radiant:
misc...
	* made shaderplug msg to look not like error (but barely noticeable)
	* removed Texdef_FitTexture copypasted code
	* ctrl+shift+mouse strafe mode: moving mouse forward moves camera forward, back - back
	* add map to recent ones on SaveMap (instead of doing that in 'open by cmd line': spoils the list)
	* fix: spin buttons alignment in patch inspector
	* fix: patch inspector window pos save/restore during run time
	* removed console, texbro buttons in regular layout
	* ent inspector: saving window splits pos in non regular layouts
	* ent inspector: saving lower split pos aswell
	* ent inspector: fix of: minimizing part behind middle to 0
	* saving find/replace wnd pos; bringing ontop, if is (present + called)
	* moved 'find unique name for' output to _DEBUG
	* fix of 'GLib-CRITICAL **: Source ID was not found when attempting to remove it' in buid monitor timer
	* fix: build menu customizing: command field is reachable right after creating new entry
2017-08-01 14:25:41 +03:00
Garux 0fb65a91c7 Q3map2:
* -brightness 0..alot, def 1: mimics q3map_lightmapBrightness, but globally + affects vertexlight
	* -contrast -255..255, def 0: lighting contrast
	* packer improvements

Radiant:

binds...
	* entity inspector: Tab enters Key field, toggles between key/value fields; Del deletes keys; Esc quits

misc...
	* improved mwheel 2d zoom by Neumond
	* +makeRoom: like hollow, but extrudes faces outwards; for making rooms
	* deactivating tex dirs tree after loading dir, so SPACE and ENTER aren't broken for 2D after that
	* Regular, RegularLeft layouts: smaller console, bigger tex browser
	* Rotate, Scale dialogs: values aren't erased on Enter, OK, Apply (are on cancel, esc)
	* Rotate dialog: fix: new value in focused field wasn't taking in account on Enter
	* +updating texture directories list on 'flush and reload shaders' (reloading shaderlist aswell)
	* NumLock perspective window fix
	* ctrl+k(ConnectEntities): friendlier to complex connections, takes in account existing keys
		(priority: target > targetname > none)
	* +'all Supported formats' default option in open dialogs
	* defaulted show light radii
	* camera fov: 90->110
	* cubic clip: off by default; bigger def dist; fixed button's shortcut tip
	* prefs: Min & Max texture thumbnail size + dependant on scale;
		def = *scale .5, min 48, max 160 (makes range 96-320 visually differentiated)
2017-08-01 13:57:26 +03:00
Garux 9fed37bae0 Q3map2:
* native surfaceparm noob support (no -custinfoparms needed)
	* -noob in bsp phase: assign surfaceparm noob to all map surfaces
	* surfaceparm ob: skip assigning surfaceparm noob with -noob on that
	* farplane modes: radius+radius, origin2origin, exact (add r/o/e to the number to enable), < 0 works too
	* samples+filter - enabled again, makes sense
	* -vertexscale
	* fixed -novertex, (0..1) sets
	* quick q3map_novertexlight (?)
	* fixed _clone _ins _instance (_clonename)
	* -nolm - no lightmaps
	* ent keys aliases:_sa - shadeangle;_ss - samplesize
	* -shift N -shift X Y Z: shift whole map to some coords
	* more fogs (256) (ingame appearence lots of ones might be bugged due to engine arrangement, needs testing)
	* q3map_remapshader remaps anything fine, on all stages (effect is: postrenaming shader when things are have been done)
	* fixed 'unknown argument 1' at -lightanglehl
	* -nocmdline writting to worldspawn

Radiant:

binds...
	* wasd camera binds, c - deSelect, z - delete
	* ExpandSelectionToEntities - shift+e
	* make detail - alt+d
	* arbitrary rotation - shifr+r
	* arbitrary scale - ctrl+shift+s
misc...
	* fit width, fit height butts in surf inspector (for trims) (saves scales ratio)
	add old TODO with ideas
2017-08-01 13:26:50 +03:00
Rudolf Polzer e4287c28bb my own uncrustify run 2012-03-27 12:03:21 +02:00
Rudolf Polzer b25aa8735d Revert "fix invert selection logic", as that fix made other cases worse
This reverts commit 4cd61dfa7d.
2011-08-19 15:53:30 +02:00
Rudolf Polzer 4cd61dfa7d fix invert selection logic 2011-06-30 13:34:23 +02:00
Rudolf Polzer 91d1810baf make shift-a not always check classname, but check the current entity key if entity inspector is open 2010-12-22 17:38:33 +01:00
Rudolf Polzer 288318d040 apparently calling FindOrInsertWorldspawn during tree traversing is bad, so let's not do that 2010-11-01 07:43:42 +01:00
Rudolf Polzer 5f44865ec2 fix cloning (don't clone the worldspam) 2010-09-04 13:52:03 +02:00